{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append('/home/hzh/.local/lib/python3.5/site-packages/')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from matplotlib import pyplot as plt\n",
    "from torchvision import transforms, utils\n",
    "from tqdm import tqdm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import yaml\n",
    "from PIL import Image\n",
    "from os.path import join\n",
    "import cv2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "%aimport cv_utils\n",
    "from cv_utils import UndistortResize, CV_pipeline, ToGray, Reshape2Tensor, ExtraPadding"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from DLogger import DLogger"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "log = DLogger(\"Dense_net_pytorch\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "BATCH_SIZE = 256"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch\n",
    "from torchvision import transforms, datasets\n",
    "\n",
    "\n",
    "def rgb2gray(rgb):\n",
    "    return np.dot(rgb[...,:3], np.array([0.2989, 0.5870, 0.1140], dtype=np.float32))\n",
    "class Standlizer:\n",
    "    def __init__(self, height, width):\n",
    "        self._h, self._w = height, width\n",
    "\n",
    "    def __call__(self, img):\n",
    "        img = np.array(img,dtype=np.float32)\n",
    "#         img = rgb2gray(img)\n",
    "#         print(img.shape)\n",
    "        img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n",
    "        assert img.shape == (self._h, self._w), \"wrong shape:%s\"%str(img.shape)\n",
    "        return torch.from_numpy(img.reshape((1, self._h, self._w)))\n",
    "    \n",
    "\n",
    "data_transform = transforms.Compose([\n",
    "        Standlizer(64, 64),\n",
    "        transforms.Normalize((0.5, ), (0.5,))\n",
    "#         transforms.ToTensor()\n",
    "    ])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "font_dataset = datasets.ImageFolder(root='data/fontset3',\n",
    "                                           transform=data_transform)\n",
    "dataset_loader = torch.utils.data.DataLoader(font_dataset,\n",
    "                                             batch_size=BATCH_SIZE, shuffle=True,\n",
    "                                             num_workers=4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open(\"./data/chi3500.txt\", 'r') as f:\n",
    "    chi3500 = f.readline()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "num_classes = len(chi3500)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "idx2class = {v:k for k, v in font_dataset.class_to_idx.items()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3753"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "max([v for k, v in font_dataset.class_to_idx.items()])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle\n",
    "with open('idx2class.pickle', 'wb') as handle:\n",
    "    pickle.dump(idx2class, handle, protocol=pickle.HIGHEST_PROTOCOL)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "def label2chi(idx):\n",
    "    return chi3500[int(idx2class[idx.item()])]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "def check_dataset(datasets):\n",
    "    for data in datasets:\n",
    "        images, labels = data\n",
    "        grid = utils.make_grid(images.cpu())\n",
    "        plt.imshow(grid.numpy().transpose((1, 2, 0)))\n",
    "        print(\"labels:\", labels)\n",
    "        fonts = list(map(label2chi, labels))\n",
    "        print(\"fonts=\", fonts)\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels: tensor([ 965, 1932, 2163, 3581, 1105, 2606, 2046, 2269, 1903, 2186, 1719, 3481,\n",
      "        2824, 1815,  182,  648,  746, 1089, 3132,  121, 2779, 1955, 3243, 3678,\n",
      "        2449, 1561, 1006,  700, 1340, 1360, 1445, 3715,  102, 2564,  709, 2523,\n",
      "        1980, 3635,  793, 3648, 3008, 3397, 2717,  206,  760,  429, 1684,  246,\n",
      "        1444, 1682, 3504,  656, 2421,  613, 1572, 2432,  603, 1112, 1056, 2238,\n",
      "        1474, 2092, 2074, 3559,  895,  963, 3705, 3071, 1882, 3748, 3671, 2600,\n",
      "        3068, 3030,  583, 2263,  446,  463,  656, 1414,  279,  499, 1111,  616,\n",
      "        2120,  732, 2008,  487, 2368,  686, 2511,  300, 2926, 3655,  563, 2855,\n",
      "         252, 1885, 3403, 2420, 1924, 3386, 2683, 1224, 2662, 1072, 2392, 1553,\n",
      "        3364, 3169, 1281, 1417, 3514, 1905, 1157,  757, 2967, 2564, 2075, 2467,\n",
      "        3356, 2697,  460, 3404, 2606, 1469,  842,  294,  868, 2505, 1737, 3405,\n",
      "          10, 3193, 2317, 1243, 3110, 2554, 3533, 3571,  322, 3563,  610, 1586,\n",
      "        3374, 1500,  182, 1679, 3065, 1313,  798, 3423, 3657, 3372, 2081,  437,\n",
      "        3623,  977, 2175, 2145, 1144, 3582, 1971, 1094, 1085, 2802,  446, 3679,\n",
      "        2493, 1840,  352, 2767, 2948, 2513, 3183, 3742, 1183, 1067, 1759, 1885,\n",
      "          33, 2780,  492, 2877, 3499, 3017, 3061, 3542, 2466,   56, 1211,  928,\n",
      "         887, 3720, 1731, 1232,  428, 1413,  815, 2563, 3584, 3669, 2907, 3312,\n",
      "        3685, 2352, 1109, 2501, 2703, 2916, 2176,  105, 2224,  999,    4, 1998,\n",
      "         663, 1386, 2523, 2755, 1281,   50, 3506, 1431, 3456, 2700,  989,   22,\n",
      "        3430,  967, 2301, 1229, 2072, 2840, 2031, 2642, 2275, 1047, 1246, 1186,\n",
      "          37, 3113,  318,  474, 2170, 1783, 1334, 1985, 2495,  946, 3729, 3389,\n",
      "        3071,  768, 2805, 1625])\n",
      "fonts= ['民', '铜', '狭', '耕', '懦', '幼', '尝', '扯', '田', '现', '栓', '浮', '宠', '塔', '剂', '理', '遍', '钮', '催', '昏', '懊', '吐', '靛', '刽', '咬', '烧', '姆', '辆', '鞘', '擒', '忍', '焊', '悲', '颖', '疗', '译', '拓', '刮', '鲁', '官', '咨', '反', '暂', '甲', '留', '句', '舒', '见', '人', '输', '付', '栗', '秧', '陛', '蛇', '痒', '滥', '阿', '腻', '啸', '儒', '芜', '蜗', '哥', '帽', '蔑', '函', '川', '梯', '褐', '诡', '右', '触', '纵', '啦', '屑', '爱', '郡', '栗', '券', '交', '颗', '殴', '佬', '硒', '鳞', '婉', '亢', '呀', '帘', '亦', '轿', '州', '胞', '傀', '拯', '舰', '锑', '饭', '鸯', '蝉', '藩', '跃', '暗', '袁', '捏', '岩', '上', '遏', '耽', '乞', '炔', '缚', '恬', '裴', '标', '抓', '颖', '涡', '腋', '鹅', '运', '俊', '泛', '幼', '蔡', '锣', '饺', '濒', '亿', '烁', '坊', '衡', '蹈', '许', '菩', '此', '萤', '梆', '蛤', '解', '鸽', '浪', '伸', '洱', '三', '剂', '殊', '矗', '簿', '赂', '肥', '贯', '尔', '握', '倦', '姑', '命', '咸', '媳', '耪', '更', '托', '农', '拧', '虫', '爱', '辊', '蚁', '谭', '近', '窄', '竹', '程', '弹', '貉', '砒', '娘', '颂', '锑', '瑚', '充', '烤', '植', '绊', '籽', '座', '肛', '曳', '划', '拼', '孟', '毛', '航', '顺', '破', '俱', '睬', '虑', '影', '羹', '轨', '痔', '赌', '果', '旬', '欧', '易', '孕', '衷', '贤', '悔', '熬', '牟', '很', '烷', '利', '囚', '译', '闸', '乞', '花', '父', '瓤', '疯', '晕', '末', '喉', '费', '皿', '羞', '泼', '瓮', '疹', '唯', '峪', '星', '能', '朴', '披', '胡', '赐', '睫', '慨', '锨', '酸', '瞧', '洼', '已', '丙', '号', '番', '川', '彪', '瘴', '时']\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGsAAAD8CAYAAABw3Fr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAVd0lEQVR4nO2dX+xmxVnHP49L4YKi3S2WbCp2lwZN8Iby+6WSSE1N7RaIFquJYS9khSbUpCTlojFbMcotNfSC2FBoSmwNgpgWIcYKlDTWG/7s0oVlge3+llJkAwvWpGhqqIuPF2cOO3t2zpm/57xn3t/7TU7e886Zf+8888x855nnzCuqygp14OcWXYEVwrESVkVYCasirIRVEVbCqggrYVWEyYUlIpeLyGER2RCRvVOXXzNkynWWiGwBfgB8HHgFeBLYrarPTVaJijG1Zn0Y2FDVF1X1Z8C9wFUT16FanDFxee8H/t36/grw691IInI9cL35ujZBvRYCVZWY+FMLKwiqeidwJ4CIrOxhBlML6xhwvvX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MQYvA84F/sPcfyA2cQ3COuyyEdYIEdmX81tWw2BFWAmrItQgrDsXXYGCyPots18Ur3ASNWjWCgYrYVWE2QpLCvy9+9SQ5qDMg9IcjLnPhG0TkUdE5Ij53GrCRZpDMjek+b/nS7wFxG6ATXGR8ffuC673S8C5nbAol72ha66a9WHM37ur6s+A9u/da8RVwNfN/dc5eSjmVcA3tMFjwHvk1L8UPg1zFdaof+8+IhR4WET2G3c6iHfZ60UN5qaacJmqHhOR9wGPiMgL9kNV1Zw3OeeqWdlua4uAqh4zn68D99MM57Eue72Yq7CK/L37lBCRs0XknPaextXuWeJd9noxy2FQVU9Igb93nxjnAfeb/aozgL9T1X8RkSeB+0Tk08CPaE7rBvhnGka4AfwUuNZXwMrcVBHmOgyu4MBKWBVhJayKsBJWRVgJqyKshFURVsKqCP8PfSZTasWWlrYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "check_dataset(dataset_loader)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1966\n"
     ]
    }
   ],
   "source": [
    "print(idx2class[1075])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'啮'"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chi3500[1966]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "train_size = int(0.8 * len(dataset_loader))\n",
    "test_size = len(dataset_loader) - train_size\n",
    "train_dataset, test_dataset = torch.utils.data.random_split(dataset_loader, [train_size, test_size])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_landmarks_batch(sample_batched):\n",
    "    \"\"\"Show image with landmarks for a batch of samples.\"\"\"\n",
    "    images_batch, landmarks_batch = \\\n",
    "            sample_batched[0], sample_batched[1]\n",
    "    batch_size = len(images_batch)\n",
    "    im_size = images_batch.size(2)\n",
    "    grid_border_size = 2\n",
    "\n",
    "    grid = utils.make_grid(images_batch)\n",
    "    plt.imshow(grid.numpy().transpose((1, 2, 0)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 torch.Size([256, 1, 64, 64]) tensor([ 221,  907, 1793, 1239,  302, 1599,  626, 2695, 2998,  164,  125, 3165,\n",
      "        3736, 1764, 3487, 3643, 2990, 3599,  874,  117, 1489, 1088, 1671, 1785,\n",
      "         659, 1274, 2104, 1102,  133, 3579, 1736, 2814, 1292, 1019, 3334,  262,\n",
      "        3719, 1426, 1425, 1931,   23, 1937, 3111, 3372, 3558, 1422,  357,   32,\n",
      "        2035, 1586, 2681, 1468, 3633, 2908,  200, 2223,  104,  844, 2205, 1085,\n",
      "        2821, 1307,  825, 1781,  230, 3277, 2484,  537, 1996,  431, 3518,  380,\n",
      "        2104,  612, 2486, 3489,  489, 1797,  806, 1747, 1627, 2997, 1011, 1398,\n",
      "        1196,  897,  211, 3296, 1219, 3073,    9, 1950,  426,  813, 1064, 1655,\n",
      "        1381, 2023,  952, 2086, 1339, 3017,  778, 3312, 1411, 2079, 1825, 2375,\n",
      "        2793, 2298, 3236, 3081, 3271, 3185,  179, 1482, 3179, 2416, 3447,  114,\n",
      "        3721, 1697, 2313, 1508, 1613, 2104, 1244, 3242, 3229, 2592, 3402,  471,\n",
      "        2907, 3088, 2982, 2803, 2236, 3612,  226, 1738, 2006, 2134, 1077,  789,\n",
      "        2223, 2284,  748, 1059, 2651, 2452,  880, 1647, 2482,  980,  777,  928,\n",
      "        2640,  641,  311, 3221,  401,   84, 1173, 2787, 1193, 3549, 1523,  823,\n",
      "         458, 3623, 1515,  308, 1076, 1415, 1290, 1879, 1802, 3616, 2812, 3713,\n",
      "        3141,  796, 1884,  288, 1110, 2489,  357,  546, 2319, 1577, 2904, 1619,\n",
      "        2184, 3081,   71, 3020, 2754, 1734, 3410, 1570, 3115, 1570, 1613, 2929,\n",
      "        2183, 2413, 1809,  453, 1801, 1860, 3322,  808, 3581, 1182, 1570,  818,\n",
      "        1419, 2439, 2187, 3028,  794, 2155, 1671, 1899, 3265, 3134, 3227, 2652,\n",
      "         251,  463,  937, 3045, 2167, 1529, 3736, 3095, 1785, 2681, 1476, 1784,\n",
      "        2779, 1540, 1682, 3242, 3065, 1398,  100, 2394, 2265, 3605, 1667, 2933,\n",
      "        2761, 3411,  373,  879])\n",
      "1 torch.Size([256, 1, 64, 64]) tensor([2300, 1308, 2202,  734, 1803, 1299,  517, 2709, 1686, 3660,  295,  146,\n",
      "         201, 1475, 1156, 2043, 1719,  464, 1260, 1371, 1232,  167, 1836, 3381,\n",
      "        2751, 3464,  250, 1129,  776, 2749, 3039, 1577, 3753, 3541, 3099, 1626,\n",
      "         840,  213, 1249,  722,  746,  776, 2698,  860, 1988,  185, 3732, 2668,\n",
      "          71, 3200, 1731, 3043,  551, 2609, 2869,  580,  596, 3637, 1259, 2075,\n",
      "        3203,  202, 1528, 2690, 3071,  242,  719, 2450, 1254, 1459, 3083,   73,\n",
      "        1878, 3332, 2773,  737, 1033, 1607, 2131, 1207,  987,  703, 3731, 3686,\n",
      "        2677, 2847, 2100, 1779, 2862, 3212, 1668,  513, 1116, 2950, 2344, 3720,\n",
      "          52, 3325, 2125, 1109,  759, 1979, 3021, 2133, 1479, 3310,  261, 2512,\n",
      "        3019, 2311, 2867, 1616, 3473, 2591, 1309,  559, 2020, 1718, 2202, 3411,\n",
      "        3739, 1225,   35, 2482, 2246, 2707,  528, 3446, 1431,  330,   49, 2408,\n",
      "        1330, 1257,  195, 3492, 2407, 1642, 2843,  854, 3198, 2992, 3013, 1124,\n",
      "        1297, 2004, 1277, 2883, 2160,  511, 2127,  526, 1288, 1447,  101, 3440,\n",
      "        1359, 2020, 3613, 2393, 3585,  461, 3085, 3214, 3643,  261, 2102,  751,\n",
      "        2676, 2250, 3659, 3540, 3000,  427,  339, 1081, 1052, 1159,  595, 1337,\n",
      "         946, 3418,  254,   22, 2217,  172, 2820, 1281, 2898, 1257, 3346,  897,\n",
      "         680, 2202, 3328, 1918, 2602, 3067, 1274, 2297, 2230, 3207, 1668, 3174,\n",
      "         859, 1148, 2526,  684,  906, 1003,  411,  704,  188,  796,  723, 2264,\n",
      "        1340, 1612, 1738,  574,  405, 3113, 1988,  957, 1955,  415, 3700,  229,\n",
      "        3304, 1080, 2632, 1544, 3010, 2353, 3705, 3124, 2006, 1982,  411, 1840,\n",
      "         225,  768, 1686, 3134,  853, 2635,  746, 1540, 1733, 2437, 1574, 1913,\n",
      "         204, 2162,  786, 1646])\n",
      "2 torch.Size([256, 1, 64, 64]) tensor([3426, 1106, 1779, 2129,  394, 2780, 1625, 2044, 1488,  518, 2798, 1863,\n",
      "        1792, 1239, 3172,   12, 1006,  324, 1052, 2167, 1439, 2453, 2031,  435,\n",
      "        3231,  742, 2139, 2198, 2708,  661, 2262, 1552, 3602, 1325, 1878, 2681,\n",
      "        3114,  346, 2873, 2351, 1509, 1547,  149, 2175,  555, 2718, 2842, 3141,\n",
      "        2674, 3081, 2116, 3106, 2028, 2313, 1836, 2636, 2483, 1997,   17, 3227,\n",
      "        2870, 2923,  366, 2787, 2827, 2667,  658, 2650, 1015, 1500, 1999,  782,\n",
      "        2487, 1168, 2905, 2201,  618, 1170, 3219,  158,  885, 2852, 2574,  211,\n",
      "        1529, 1169,  196,   81,  697, 1898,  255, 3196, 2131, 2567, 2930, 2771,\n",
      "         702, 3590, 3541, 2924, 1762, 1286,  319, 2165, 2941,  688, 3252, 1549,\n",
      "        3114, 3506, 2372, 2413, 1204, 2664, 1810, 2862, 3140, 1919,   14,  276,\n",
      "        3694, 2036,  607, 2496, 2317, 2797, 3168,  531, 2073, 3488, 2367, 3276,\n",
      "        1273, 1901, 3100, 3488,  696, 2183, 2774, 3304, 3154,  968, 1323,  698,\n",
      "        2339, 1400, 1802, 2787, 1787, 3531, 1990, 2182, 2442, 3728, 3480, 2462,\n",
      "        3665, 1337, 1870, 2197, 2827, 2370, 2793, 2397,  704,  697, 3092, 3000,\n",
      "         708, 2543, 1100, 1249,  774, 1940, 3186, 2329, 3050, 1106, 1705, 1379,\n",
      "        1917, 2238, 2440, 2685, 2044,  882,  578, 1631,  312, 3264, 1390, 2528,\n",
      "          93, 3512,  331, 3442, 1893, 3020, 2426, 3475, 2243,  829, 1199, 3230,\n",
      "        1318, 2692, 2801, 3561, 1424, 3089, 1269, 2021,  606, 1687, 1456, 1617,\n",
      "         579, 3339, 2480, 2451, 2074, 1469, 1303, 1671, 2034, 2707, 2668,  732,\n",
      "         218,    2, 2024, 3300, 1463, 3689, 3510, 1619,  302,  530, 2016, 2557,\n",
      "        2489, 1226, 3126, 2200,   37, 2793, 1346,  172,  385, 2420, 2367,   29,\n",
      "        3360,   12, 3640, 3731])\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3 torch.Size([256, 1, 64, 64]) tensor([ 692, 2750, 2074, 3076,  305, 3396, 3448, 3658, 2471,  961,  851, 3698,\n",
      "        1574, 1829, 3287, 2718,  988, 1466, 3023,  950,  806, 2534, 2437,  428,\n",
      "         999,  673, 2904, 2837, 3059,  660,  984, 1874, 1908, 1812, 3534, 3631,\n",
      "        1232, 3520,  119,  609, 3110, 3269,  310,   88,  635, 2215, 3728,  385,\n",
      "        1468, 3141, 2557,  217, 1116, 1366, 2265, 1345, 2906, 1037,  865, 1752,\n",
      "        2499, 2712, 3167, 2664, 2793, 3297, 3186, 3385, 2540, 2469, 3044, 2878,\n",
      "         501,  715, 1773, 1758,  416,  122, 2775, 3390, 1635, 3166, 1913,  920,\n",
      "        3335, 1641, 2273, 3577, 2526,  825, 3625,  291, 1011, 3425, 3608,  531,\n",
      "         199, 2873, 2074, 2785, 1697, 2038, 1591, 1403, 2534,  481, 1304, 1866,\n",
      "        1134, 1550, 3230, 3330, 2333, 1843,  862,  212,  597, 2549, 1339, 1418,\n",
      "        2163, 3338, 1324,  788, 1001, 2231, 1123,  386,  228, 3370,  954, 3256,\n",
      "        3657, 2061, 1827, 1145, 3064, 2680, 1467,  508, 1773, 2195, 1483,  384,\n",
      "        1921, 2906,  990, 3461, 1055, 2790, 2887,   62, 1122, 2369, 1466, 1821,\n",
      "        1159, 1587,  553,  197, 2751, 2234,  498, 2998, 2323, 2346,  664, 1936,\n",
      "        1167, 1768, 2316,   58, 1563,  595, 1196, 3745, 1349, 2190,  468, 1963,\n",
      "        3405, 3720,  472, 1018, 2277,  226,  191, 2585, 2593, 1171, 2327, 3536,\n",
      "        1487, 1537, 2927, 3327, 1585, 2159, 1537, 3624, 1316, 1410, 1241, 2153,\n",
      "        2196, 2649, 1836, 3180, 1695,  218,  586,  584,  955, 2717, 3202, 1081,\n",
      "        1202,  112, 1800, 3420, 3427,  999, 3501,   84, 3168, 3086, 1335, 2881,\n",
      "        2814, 1276, 1777, 3664, 2751,  680,  206, 2351,  432,  387,  883,  646,\n",
      "        2341,  379,  305,  415, 2042,  495, 1859, 2022, 2679,  679, 3707, 1552,\n",
      "         725,  191,  818, 1480])\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAEQAAADnCAYAAACnm/DyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAKC0lEQVR4nO1d7bLbOgiUO/f9X9n9U5+rqgIWWCQ5k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xBILra6DFqa3EVOyrNPBUp+xcyzz2lw/Vamxx6gNCIb2c7Gsh6z3lVvoQJ31WVakz2OFkhFXDmyf5ag3vIrZifPcfRrzHdEx8dlu0NGWmZ/lrLuGUgNfsvmPyGTPQmv5EMq8RXIgK9ABnwFMuArkAFfgQz4DcAc5hVtBRy9AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "for i_batch, sample_batched in enumerate(dataset_loader):\n",
    "    print(i_batch, sample_batched[0].size(), sample_batched[1])\n",
    "    if i_batch == 3:\n",
    "        plt.figure()\n",
    "        show_landmarks_batch(sample_batched)\n",
    "        plt.axis('off')\n",
    "        plt.ioff()\n",
    "        plt.show()\n",
    "        break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# from densenet import densenet121\n",
    "# net = densenet121(num_classes=3800)\n",
    "import netrons\n",
    "net = netrons.MiniAlexNet(num_classes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "tensor([[ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341],\n",
       "        [ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341],\n",
       "        [ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341],\n",
       "        ...,\n",
       "        [ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341],\n",
       "        [ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341],\n",
       "        [ 0.0034, -0.0089,  0.0071,  ..., -0.0316,  0.0136, -0.0341]],\n",
       "       grad_fn=<AddmmBackward>)"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = torch.zeros(64, 1, 64, 64)\n",
    "net(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "import torch.optim as optim\n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "criterion = nn.CrossEntropyLoss()\n",
    "optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cuda:0\n"
     ]
    }
   ],
   "source": [
    "print(device)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MiniAlexNet(\n",
       "  (features): Sequential(\n",
       "    (conv0): Conv2d(1, 32, kernel_size=(12, 12), stride=(1, 1))\n",
       "    (relu0): ReLU(inplace)\n",
       "    (maxPool0): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
       "    (conv1): Conv2d(32, 64, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))\n",
       "    (relu1): ReLU(inplace)\n",
       "    (maxPool1): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
       "    (conv2): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
       "    (relu2): ReLU(inplace)\n",
       "    (conv3): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
       "    (relu3): ReLU(inplace)\n",
       "    (conv4): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))\n",
       "    (relu4): ReLU(inplace)\n",
       "    (maxPool2): MaxPool2d(kernel_size=3, stride=2, padding=0, dilation=1, ceil_mode=False)\n",
       "  )\n",
       "  (classifier): Sequential(\n",
       "    (0): Linear(in_features=1600, out_features=1024, bias=True)\n",
       "    (1): Linear(in_features=1024, out_features=3754, bias=True)\n",
       "  )\n",
       ")"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "net.to(device)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[1,   200] loss: 8.256\n",
      "[1,   400] loss: 8.232\n",
      "[1,   600] loss: 8.231\n",
      "[1,   800] loss: 8.231\n",
      "[1,  1000] loss: 8.231\n",
      "[1,  1200] loss: 8.231\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-30-bcffb28549f5>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      3\u001b[0m     \u001b[0mrunning_loss\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0.0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m     \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;32min\u001b[0m \u001b[0menumerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdataset_loader\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      5\u001b[0m         \u001b[0;31m# get the inputs; data is a list of [inputs, labels]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      6\u001b[0m \u001b[0;31m#         log.info(data[0].shape)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    629\u001b[0m         \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    630\u001b[0m             \u001b[0;32massert\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshutdown\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatches_outstanding\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 631\u001b[0;31m             \u001b[0midx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbatch\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_batch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    632\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatches_outstanding\u001b[0m \u001b[0;34m-=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    633\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0midx\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrcvd_idx\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m_get_batch\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    608\u001b[0m             \u001b[0;31m# need to call `.task_done()` because we don't use `.join()`.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    609\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 610\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata_queue\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    611\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    612\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m__next__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/queues.py\u001b[0m in \u001b[0;36mget\u001b[0;34m(self, block, timeout)\u001b[0m\n\u001b[1;32m     92\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mblock\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     93\u001b[0m             \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_rlock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 94\u001b[0;31m                 \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     95\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_sem\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrelease\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     96\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36mrecv_bytes\u001b[0;34m(self, maxlength)\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mmaxlength\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mmaxlength\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    215\u001b[0m             \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"negative maxlength\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 216\u001b[0;31m         \u001b[0mbuf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaxlength\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    217\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mbuf\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    218\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_bad_message_length\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36m_recv_bytes\u001b[0;34m(self, maxsize)\u001b[0m\n\u001b[1;32m    405\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    406\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmaxsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 407\u001b[0;31m         \u001b[0mbuf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    408\u001b[0m         \u001b[0msize\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstruct\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munpack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"!i\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbuf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    409\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mmaxsize\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0msize\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0mmaxsize\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36m_recv\u001b[0;34m(self, size, read)\u001b[0m\n\u001b[1;32m    377\u001b[0m         \u001b[0mremaining\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msize\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    378\u001b[0m         \u001b[0;32mwhile\u001b[0m \u001b[0mremaining\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 379\u001b[0;31m             \u001b[0mchunk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mremaining\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    380\u001b[0m             \u001b[0mn\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchunk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    381\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "for epoch in range(8):  # loop over the dataset multiple times\n",
    "\n",
    "    running_loss = 0.0\n",
    "    for i, data in enumerate(dataset_loader, 0):\n",
    "        # get the inputs; data is a list of [inputs, labels]\n",
    "#         log.info(data[0].shape)\n",
    "#         log.info(data[1].shape)\n",
    "#         assert data[0].shape[1:] == (1, 50, 50)\n",
    "#         assert data[1].shape == torch.Size([BATCH_SIZE])\n",
    "        inputs, labels = data[0].to(device), data[1].to(device)\n",
    "\n",
    "        # zero the parameter gradients\n",
    "        optimizer.zero_grad()\n",
    "\n",
    "        # forward + backward + optimize\n",
    "        outputs = net(inputs)\n",
    "#         log.info(\"labels:\", labels)\n",
    "#         log.info(\"outputs:\", outputs)\n",
    "        loss = criterion(outputs, labels)\n",
    "#         log.info(\"loss=\", loss)\n",
    "        loss.backward()\n",
    "        optimizer.step()\n",
    "\n",
    "        # log.info statistics\n",
    "        running_loss += loss.item()\n",
    "        if i % 200 == 199:    # log.info every 2000 mini-batches\n",
    "            loss_ave = running_loss / 200\n",
    "            log.info('[%d, %5d] loss: %.3f' %\n",
    "                  (epoch + 1, i + 1, loss_ave))\n",
    "            if loss_ave < 0.01:\n",
    "                break\n",
    "            running_loss = 0.0\n",
    "\n",
    "\n",
    "log.info('Finished Training')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# torch.save(net.state_dict(), \"./dense_net_param.pth\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "torch.save(net, \"./entire_densenet.pth\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "net = torch.load('./entire_densenet.pth')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "def evaluate_accuracy(testloader, net):\n",
    "    correct = 0\n",
    "    total = 0\n",
    "    with torch.no_grad():\n",
    "        for data in tqdm(testloader):\n",
    "            images, labels = data[0].to(device), data[1].to(device)\n",
    "            outputs = net(images)\n",
    "            _, predicted = torch.max(outputs.data, 1)\n",
    "            total += labels.size(0)\n",
    "            correct += (predicted == labels).sum().item()\n",
    "\n",
    "    log.info('Accuracy of the network on the 10000 test images: %d %%' % (\n",
    "        100 * correct / total))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  1%|          | 33/4000 [00:25<1:07:54,  1.03s/it]"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-33-8d3c1a3fd5f0>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mevaluate_accuracy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtest_dataset\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnet\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m<ipython-input-32-21922a9b5b0b>\u001b[0m in \u001b[0;36mevaluate_accuracy\u001b[0;34m(testloader, net)\u001b[0m\n\u001b[1;32m      3\u001b[0m     \u001b[0mtotal\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m     \u001b[0;32mwith\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mno_grad\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m         \u001b[0;32mfor\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mtqdm\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtestloader\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      6\u001b[0m             \u001b[0mimages\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdevice\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdevice\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      7\u001b[0m             \u001b[0moutputs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnet\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimages\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/tqdm/std.py\u001b[0m in \u001b[0;36m__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m   1079\u001b[0m             \"\"\"), fp_write=getattr(self.fp, 'write', sys.stderr.write))\n\u001b[1;32m   1080\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1081\u001b[0;31m         \u001b[0;32mfor\u001b[0m \u001b[0mobj\u001b[0m \u001b[0;32min\u001b[0m \u001b[0miterable\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1082\u001b[0m             \u001b[0;32myield\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1083\u001b[0m             \u001b[0;31m# Update and possibly print the progressbar.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    629\u001b[0m         \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    630\u001b[0m             \u001b[0;32massert\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshutdown\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatches_outstanding\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 631\u001b[0;31m             \u001b[0midx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbatch\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_batch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    632\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbatches_outstanding\u001b[0m \u001b[0;34m-=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    633\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0midx\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrcvd_idx\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/torch/utils/data/dataloader.py\u001b[0m in \u001b[0;36m_get_batch\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m    608\u001b[0m             \u001b[0;31m# need to call `.task_done()` because we don't use `.join()`.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    609\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 610\u001b[0;31m             \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdata_queue\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    611\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    612\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m__next__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/queues.py\u001b[0m in \u001b[0;36mget\u001b[0;34m(self, block, timeout)\u001b[0m\n\u001b[1;32m     92\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mblock\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     93\u001b[0m             \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_rlock\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 94\u001b[0;31m                 \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     95\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_sem\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrelease\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     96\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36mrecv_bytes\u001b[0;34m(self, maxlength)\u001b[0m\n\u001b[1;32m    214\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mmaxlength\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mmaxlength\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    215\u001b[0m             \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"negative maxlength\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 216\u001b[0;31m         \u001b[0mbuf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmaxlength\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    217\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mbuf\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    218\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_bad_message_length\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36m_recv_bytes\u001b[0;34m(self, maxsize)\u001b[0m\n\u001b[1;32m    405\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    406\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0m_recv_bytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmaxsize\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 407\u001b[0;31m         \u001b[0mbuf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m4\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    408\u001b[0m         \u001b[0msize\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstruct\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0munpack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"!i\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbuf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    409\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mmaxsize\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0msize\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0mmaxsize\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/usr/lib64/python3.6/multiprocessing/connection.py\u001b[0m in \u001b[0;36m_recv\u001b[0;34m(self, size, read)\u001b[0m\n\u001b[1;32m    377\u001b[0m         \u001b[0mremaining\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msize\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    378\u001b[0m         \u001b[0;32mwhile\u001b[0m \u001b[0mremaining\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 379\u001b[0;31m             \u001b[0mchunk\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mhandle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mremaining\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    380\u001b[0m             \u001b[0mn\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchunk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    381\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "evaluate_accuracy(test_dataset.dataset, net)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_result(datasets, net):\n",
    "    with torch.no_grad():\n",
    "        for data in datasets:\n",
    "            images, labels = data[0].to(device), data[1].to(device)\n",
    "            print(\"input shape\", images.shape)\n",
    "            outputs = net(images)\n",
    "            grid = utils.make_grid(images.cpu())\n",
    "            plt.imshow(grid.numpy().transpose((1, 2, 0)))\n",
    "            _, predicted = torch.max(outputs.data, 1)\n",
    "            print(predicted)\n",
    "            fonts = list(map(label2chi, predicted.cpu()))\n",
    "            print(\"fonts=\", fonts)\n",
    "            break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "input shape torch.Size([256, 1, 64, 64])\n",
      "tensor([ 623, 1975, 2269,  245, 2638,  431, 1820, 3526, 1434,  589, 1217, 1159,\n",
      "        2739, 3427, 3652, 1376,  772, 1321, 2945,  842, 3387, 3535,  328,   78,\n",
      "        2641, 1236, 2545, 1686,  744, 3627,  188, 1690, 1205, 3006, 3588, 3233,\n",
      "         121, 3008,  701, 1025,  527, 3086, 1244,  179, 1309, 2393, 1837, 2386,\n",
      "        3164, 2265,  909, 1549, 2986,  140, 2954,  397, 3686, 2023, 2782, 3466,\n",
      "         170, 1635,  592, 1385, 2161,  727,   41, 2234, 2345, 2432, 2042, 2516,\n",
      "        2174,  877, 1006, 2753, 2538,  347, 1190, 2628, 2570, 1932, 1366, 1911,\n",
      "         220, 2675,  808, 1977, 2990, 2524, 2165, 3149, 3142, 3187, 2372, 1506,\n",
      "        3321,  996,    5,  594, 1744, 3297,  983, 1044,  279, 2789, 2543, 1447,\n",
      "        3623,   31,  645, 1454, 2787, 2665, 2983, 2178,    6,  602, 2817, 3614,\n",
      "        3343, 1080,  449,   50,  759, 1677, 3749, 3501,  487,  163,  102, 3675,\n",
      "        1409, 2433, 2315, 2008, 3527, 2931, 1742, 3748,   93, 2593, 2260, 3598,\n",
      "         422, 3643, 1302, 3019, 3607,  839, 1057, 1879, 1381, 3704, 1565, 1982,\n",
      "         375, 1556, 1639,   80, 3527,  390,  174, 1718, 1800, 3261,  774,  924,\n",
      "        2421, 2200,  702, 2471, 2644,  613,  907, 2396, 2068,  273, 2295, 2292,\n",
      "         166,  101,  572, 3115, 1763,  336, 2076, 1992, 3700, 1344,   96, 1347,\n",
      "         781, 1028,  393, 2420, 2957, 1888, 2305, 2034, 3175, 1115, 1654, 3310,\n",
      "         461,  778, 3165, 1900, 3730,   63,  941,  692, 1323, 1833,   32, 1824,\n",
      "        3028, 2452,  442,  103, 3748,  118, 2488, 1835, 2396, 1393, 2298, 1275,\n",
      "         172, 1627, 1697, 1347,  398, 1220, 3548, 2986, 1573, 1407, 1333,  756,\n",
      "         903, 3714,  631,  333, 2635,  235,  279, 2277, 1998, 1988, 3132, 3462,\n",
      "         860, 2686,  171, 3515], device='cuda:0')\n",
      "fonts= ['雷', '驮', '扯', '贱', '郁', '炬', '胎', '甘', '嚷', '栏', '乒', '赔', '择', '肺', '馆', '请', '隆', '呛', '诛', '锣', '帆', '秆', '界', '宦', '喻', '卜', '印', '疏', '伶', '骨', '记', '熟', '飘', '浊', '磅', '罢', '昏', '咨', '量', '娜', '哭', '炊', '蒲', '伎', '钳', '延', '檀', '淹', '袋', '芯', '镁', '伤', '锥', '基', '主', '厩', '裹', '巍', '展', '瓣', '级', '槽', '篮', '求', '峡', '林', '湖', '孝', '穴', '痒', '尾', '忆', '纤', '芒', '姆', '轧', '银', '迸', '啤', '与', '佣', '铜', '氢', '眺', '间', '苑', '铝', '椭', '橱', '惩', '厦', '搭', '磋', '党', '牙', '嗓', '锻', '寞', '狠', '兰', '丝', '陡', '模', '内', '交', '绽', '引', '彩', '姑', '乎', '离', '扔', '站', '辕', '壮', '舷', '恨', '避', '召', '够', '夺', '您', '觉', '花', '馏', '枢', '鹤', '赋', '亢', '及', '悲', '跪', '全', '养', '须', '婉', '杆', '肘', '私', '褐', '幌', '铀', '泄', '弓', '巨', '癌', '步', '子', '沟', '螺', '钵', '柴', '秋', '寒', '少', '挖', '境', '梢', '示', '杯', '杆', '玖', '己', '帅', '笋', '吊', '拢', '冰', '秧', '香', '卞', '一', '愈', '陛', '眉', '阎', '长', '降', '匈', '兄', '汲', '蛔', '括', '聪', '诵', '蹦', '窝', '豌', '邯', '俏', '灰', '擦', '篓', '乃', '久', '鸯', '臭', '蹄', '锈', '潍', '胆', '藕', '侍', '唉', '竣', '搂', '待', '添', '浩', '淮', '蜜', '炼', '羌', '瘫', '忽', '察', '综', '要', '攫', '回', '褐', '诲', '宜', '岔', '阎', '曲', '熊', '祈', '几', '食', '黍', '擦', '救', '萍', '篙', '锥', '舌', '醛', '桥', '榴', '酶', '悍', '擂', '届', '匙', '捡', '交', '猩', '烷', '袜', '催', '奉', '吗', '粤', '挤', '咐']\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGsAAAD8CAYAAABw3Fr3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAVJ0lEQVR4nO2dXaxdxXXHf6sm8EBoYwdiWSmOTeRWoi+Or5UilVSp2jhgtXWTSJWtqrgQyYkUpPCQB6dILS99IBVRFTUigIKaVBRKlVCsKG0gKEqeIPhSg7HhxhfHUbAcm1IptGpFarr6sGfj8fb+mM+zz+x7/tLW2Wf2fJ1Ze635z5p154qqskAZ+KWxO7CAOxbCKggLYRWEhbAKwkJYBWEhrIIwc2GJyE0isiIiqyJycNbtlwyZ5TpLRNYBPwI+ArwKPAvsU9XjM+tEwZi1Zn0QWFXVk6r6C+ARYM+M+1AsLptxe+8Ffmp9fxX4zWYmETkAHDBfl2bQL28sLVXdWl5eDq5DVcUn/6yF5QRVvR+4H0BE5tIfdvjwYQBEvMY7CrM2g6eBa63vv2rSOlG/wX1om3dVtTXdzt+Wx37m2tasMGthPQtsE5GtInI5sBc45FKwb/BniVlq0iVtz3oARGQ38DfAOuBBVf2rgfxa97E5UF3pLs9ExCmPD+yxdCnrO2fNXFi+yD1nhQglYdteDa95D0ZKQQ3Nd7GYSzY4JnxNmY06fy5NLVqzcpvweZsiihZWzBvcxy5za0goijGDfeapj9W51utTtklKmkJPxS6bKFqzaohI8EA0y7lqVZuAcmtiMZqVGvbAhhKJ5ve+OS6FIIsR1rzNH2NgEmYw9/qm2U4XcpvCooQ1JJQu4tFVV4hwhxz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5tUMLtCChbAKwkJYBWEhrIKwEFZBWAirICyEVRD+HwXM/JGH+xl2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "show_result(dataset_loader, net)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1484"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "chi3500.find('筷')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_db(fp):\n",
    "    with open(fp, 'r') as f:\n",
    "        return yaml.load(f, Loader=yaml.FullLoader)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [],
   "source": [
    "def output_to_fonts(outputs):\n",
    "    _, predicted = torch.max(outputs.data, 1)\n",
    "#     print(predicted)\n",
    "#     print(\"predicted shape=\", predicted.shape)\n",
    "    fonts = list(map(label2chi, predicted.cpu()))\n",
    "    return fonts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [],
   "source": [
    "def produce_srt(net):\n",
    "    db_index = load_db('./chi_seq_imgs/index.yaml')\n",
    "    sbt_seq = []\n",
    "    cnt = 0\n",
    "    preprocess = CV_pipeline(ExtraPadding(20, 20), UndistortResize(64, 3), data_transform)\n",
    "    que = []\n",
    "    cnt = 10\n",
    "    for k in enumerate(db_index.keys()):\n",
    "        info = db_index[k]\n",
    "        chi_chain = []\n",
    "        for fn in info['chi_seq']:\n",
    "            with torch.no_grad():\n",
    "                a = cv2.imread(join('./chi_seq_imgs', fn))\n",
    "                img = preprocess(a)\n",
    "                torch_img = img.reshape(1, 1, 64, 64).to(device)\n",
    "                outputs = net(torch_img)\n",
    "                c = output_to_fonts(outputs)\n",
    "                chi_chain += (c)\n",
    "#                 print(c)\n",
    "#                 plt.figure()\n",
    "#                 plt.imshow(a)\n",
    "#                 cnt -= 1\n",
    "#                 if cnt == 0:\n",
    "#                     return\n",
    "        sbt_seq.append((k, info['time'], ''.join(chi_chain)))\n",
    "#         cnt -= 1\n",
    "#         if cnt == 0:\n",
    "#             break\n",
    "    return sbt_seq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "0it [00:00, ?it/s]\u001b[A\u001b[A\n",
      "\n",
      "4it [00:00, 38.82it/s]\u001b[A\u001b[A\n",
      "\n",
      "7it [00:00, 34.00it/s]\u001b[A\u001b[A\n",
      "\n",
      "13it [00:00, 36.31it/s]\u001b[A\u001b[A\n",
      "\n",
      "19it [00:00, 39.99it/s]\u001b[A\u001b[A\n",
      "\n",
      "23it [00:00, 30.66it/s]\u001b[A\u001b[A\n",
      "\n",
      "30it [00:00, 35.29it/s]\u001b[A\u001b[A\n",
      "\n",
      "35it [00:00, 36.92it/s]\u001b[A\u001b[A\n",
      "\n",
      "45it [00:01, 44.28it/s]\u001b[A\u001b[A\n",
      "\n",
      "51it [00:01, 41.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "56it [00:01, 40.57it/s]\u001b[A\u001b[A\n",
      "\n",
      "62it [00:01, 42.28it/s]\u001b[A\u001b[A\n",
      "\n",
      "67it [00:01, 37.86it/s]\u001b[A\u001b[A\n",
      "\n",
      "72it [00:01, 38.80it/s]\u001b[A\u001b[A\n",
      "\n",
      "77it [00:01, 38.79it/s]\u001b[A\u001b[A\n",
      "\n",
      "88it [00:01, 47.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "97it [00:02, 52.40it/s]\u001b[A\u001b[A\n",
      "\n",
      "104it [00:02, 41.99it/s]\u001b[A\u001b[A\n",
      "\n",
      "110it [00:02, 36.71it/s]\u001b[A\u001b[A\n",
      "\n",
      "115it [00:02, 36.88it/s]\u001b[A\u001b[A\n",
      "\n",
      "121it [00:02, 40.03it/s]\u001b[A\u001b[A\n",
      "\n",
      "126it [00:02, 37.64it/s]\u001b[A\u001b[A\n",
      "\n",
      "131it [00:03, 32.27it/s]\u001b[A\u001b[A\n",
      "\n",
      "135it [00:03, 30.67it/s]\u001b[A\u001b[A\n",
      "\n",
      "139it [00:03, 30.28it/s]\u001b[A\u001b[A\n",
      "\n",
      "143it [00:03, 30.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "147it [00:03, 30.84it/s]\u001b[A\u001b[A\n",
      "\n",
      "151it [00:03, 28.49it/s]\u001b[A\u001b[A\n",
      "\n",
      "156it [00:04, 29.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "160it [00:04, 31.90it/s]\u001b[A\u001b[A\n",
      "\n",
      "165it [00:04, 34.70it/s]\u001b[A\u001b[A\n",
      "\n",
      "170it [00:04, 38.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "176it [00:04, 40.51it/s]\u001b[A\u001b[A\n",
      "\n",
      "181it [00:04, 37.55it/s]\u001b[A\u001b[A\n",
      "\n",
      "185it [00:04, 34.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "190it [00:04, 35.08it/s]\u001b[A\u001b[A\n",
      "\n",
      "194it [00:05, 34.69it/s]\u001b[A\u001b[A\n",
      "\n",
      "199it [00:05, 37.57it/s]\u001b[A\u001b[A\n",
      "\n",
      "204it [00:05, 39.74it/s]\u001b[A\u001b[A\n",
      "\n",
      "209it [00:05, 36.15it/s]\u001b[A\u001b[A\n",
      "\n",
      "214it [00:05, 38.42it/s]\u001b[A\u001b[A\n",
      "\n",
      "220it [00:05, 40.30it/s]\u001b[A\u001b[A\n",
      "\n",
      "225it [00:05, 39.51it/s]\u001b[A\u001b[A\n",
      "\n",
      "230it [00:05, 39.38it/s]\u001b[A\u001b[A\n",
      "\n",
      "235it [00:06, 38.49it/s]\u001b[A\u001b[A\n",
      "\n",
      "239it [00:06, 33.75it/s]\u001b[A\u001b[A\n",
      "\n",
      "243it [00:06, 29.88it/s]\u001b[A\u001b[A\n",
      "\n",
      "247it [00:06, 30.13it/s]\u001b[A\u001b[A\n",
      "\n",
      "251it [00:06, 29.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "255it [00:06, 28.74it/s]\u001b[A\u001b[A\n",
      "\n",
      "260it [00:06, 32.16it/s]\u001b[A\u001b[A\n",
      "\n",
      "264it [00:07, 30.40it/s]\u001b[A\u001b[A\n",
      "\n",
      "268it [00:07, 27.68it/s]\u001b[A\u001b[A\n",
      "\n",
      "271it [00:07, 26.37it/s]\u001b[A\u001b[A\n",
      "\n",
      "276it [00:07, 28.93it/s]\u001b[A\u001b[A\n",
      "\n",
      "280it [00:07, 29.68it/s]\u001b[A\u001b[A\n",
      "\n",
      "284it [00:07, 31.57it/s]\u001b[A\u001b[A\n",
      "\n",
      "288it [00:07, 31.88it/s]\u001b[A\u001b[A\n",
      "\n",
      "292it [00:08, 28.93it/s]\u001b[A\u001b[A\n",
      "\n",
      "296it [00:08, 28.17it/s]\u001b[A\u001b[A\n",
      "\n",
      "301it [00:08, 30.20it/s]\u001b[A\u001b[A\n",
      "\n",
      "305it [00:08, 28.73it/s]\u001b[A\u001b[A\n",
      "\n",
      "309it [00:08, 29.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "314it [00:08, 33.06it/s]\u001b[A\u001b[A\n",
      "\n",
      "318it [00:08, 29.01it/s]\u001b[A\u001b[A\n",
      "\n",
      "322it [00:09, 29.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "326it [00:09, 27.62it/s]\u001b[A\u001b[A\n",
      "\n",
      "331it [00:09, 30.19it/s]\u001b[A\u001b[A\n",
      "\n",
      "335it [00:09, 28.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "338it [00:09, 28.14it/s]\u001b[A\u001b[A\n",
      "\n",
      "341it [00:09, 28.15it/s]\u001b[A\u001b[A\n",
      "\n",
      "345it [00:09, 30.39it/s]\u001b[A\u001b[A\n",
      "\n",
      "349it [00:09, 29.63it/s]\u001b[A\u001b[A\n",
      "\n",
      "358it [00:10, 36.44it/s]\u001b[A\u001b[A\n",
      "\n",
      "363it [00:10, 36.31it/s]\u001b[A\u001b[A\n",
      "\n",
      "368it [00:10, 35.59it/s]\u001b[A\u001b[A\n",
      "\n",
      "372it [00:10, 30.26it/s]\u001b[A\u001b[A\n",
      "\n",
      "376it [00:10, 30.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "381it [00:10, 33.45it/s]\u001b[A\u001b[A\n",
      "\n",
      "386it [00:10, 36.86it/s]\u001b[A\u001b[A\n",
      "\n",
      "391it [00:11, 32.69it/s]\u001b[A\u001b[A\n",
      "\n",
      "395it [00:11, 30.98it/s]\u001b[A\u001b[A\n",
      "\n",
      "399it [00:11, 29.00it/s]\u001b[A\u001b[A\n",
      "\n",
      "403it [00:11, 26.21it/s]\u001b[A\u001b[A\n",
      "\n",
      "408it [00:11, 29.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "412it [00:11, 30.16it/s]\u001b[A\u001b[A\n",
      "\n",
      "416it [00:11, 32.36it/s]\u001b[A\u001b[A\n",
      "\n",
      "422it [00:11, 36.93it/s]\u001b[A\u001b[A\n",
      "\n",
      "434it [00:12, 45.69it/s]\u001b[A\u001b[A\n",
      "\n",
      "440it [00:12, 43.08it/s]\u001b[A\u001b[A\n",
      "\n",
      "446it [00:12, 34.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "452it [00:12, 39.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "457it [00:12, 39.69it/s]\u001b[A\u001b[A\n",
      "\n",
      "462it [00:12, 36.63it/s]\u001b[A\u001b[A\n",
      "\n",
      "467it [00:13, 35.99it/s]\u001b[A\u001b[A\n",
      "\n",
      "471it [00:13, 35.21it/s]\u001b[A\u001b[A\n",
      "\n",
      "475it [00:13, 32.59it/s]\u001b[A\u001b[A\n",
      "\n",
      "479it [00:13, 33.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "483it [00:13, 34.86it/s]\u001b[A\u001b[A\n",
      "\n",
      "487it [00:13, 32.19it/s]\u001b[A\u001b[A\n",
      "\n",
      "495it [00:13, 38.93it/s]\u001b[A\u001b[A\n",
      "\n",
      "502it [00:13, 42.76it/s]\u001b[A\u001b[A\n",
      "\n",
      "510it [00:14, 49.48it/s]\u001b[A\u001b[A\n",
      "\n",
      "518it [00:14, 53.24it/s]\u001b[A\u001b[A\n",
      "\n",
      "524it [00:14, 46.90it/s]\u001b[A\u001b[A\n",
      "\n",
      "530it [00:14, 47.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "536it [00:14, 42.03it/s]\u001b[A\u001b[A\n",
      "\n",
      "542it [00:14, 45.27it/s]\u001b[A\u001b[A\n",
      "\n",
      "547it [00:14, 41.76it/s]\u001b[A\u001b[A\n",
      "\n",
      "552it [00:14, 41.49it/s]\u001b[A\u001b[A\n",
      "\n",
      "557it [00:15, 39.06it/s]\u001b[A\u001b[A\n",
      "\n",
      "562it [00:15, 35.95it/s]\u001b[A\u001b[A\n",
      "\n",
      "567it [00:15, 38.94it/s]\u001b[A\u001b[A\n",
      "\n",
      "577it [00:15, 45.79it/s]\u001b[A\u001b[A\n",
      "\n",
      "583it [00:15, 47.01it/s]\u001b[A\u001b[A\n",
      "\n",
      "589it [00:15, 40.71it/s]\u001b[A\u001b[A\n",
      "\n",
      "595it [00:15, 42.41it/s]\u001b[A\u001b[A\n",
      "\n",
      "600it [00:16, 35.39it/s]\u001b[A\u001b[A\n",
      "\n",
      "604it [00:16, 34.45it/s]\u001b[A\u001b[A\n",
      "\n",
      "608it [00:16, 34.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "612it [00:16, 30.32it/s]\u001b[A\u001b[A\n",
      "\n",
      "616it [00:16, 29.09it/s]\u001b[A\u001b[A\n",
      "\n",
      "620it [00:16, 29.79it/s]\u001b[A\u001b[A\n",
      "\n",
      "635it [00:16, 38.83it/s]\u001b[A\u001b[A\n",
      "\n",
      "642it [00:17, 37.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "648it [00:17, 34.19it/s]\u001b[A\u001b[A\n",
      "\n",
      "653it [00:17, 37.08it/s]\u001b[A\u001b[A\n",
      "\n",
      "658it [00:17, 37.93it/s]\u001b[A\u001b[A\n",
      "\n",
      "663it [00:17, 36.83it/s]\u001b[A\u001b[A\n",
      "\n",
      "668it [00:17, 33.77it/s]\u001b[A\u001b[A\n",
      "\n",
      "673it [00:18, 36.53it/s]\u001b[A\u001b[A\n",
      "\n",
      "677it [00:18, 36.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "681it [00:18, 35.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "685it [00:18, 35.58it/s]\u001b[A\u001b[A\n",
      "\n",
      "689it [00:18, 34.57it/s]\u001b[A\u001b[A\n",
      "\n",
      "693it [00:18, 34.25it/s]\u001b[A\u001b[A\n",
      "\n",
      "697it [00:18, 30.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "701it [00:18, 30.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "705it [00:19, 32.36it/s]\u001b[A\u001b[A\n",
      "\n",
      "709it [00:19, 34.24it/s]\u001b[A\u001b[A\n",
      "\n",
      "713it [00:19, 34.09it/s]\u001b[A\u001b[A\n",
      "\n",
      "717it [00:19, 33.74it/s]\u001b[A\u001b[A\n",
      "\n",
      "721it [00:19, 31.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "725it [00:19, 32.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "730it [00:19, 35.99it/s]\u001b[A\u001b[A\n",
      "\n",
      "734it [00:19, 35.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "739it [00:19, 35.04it/s]\u001b[A\u001b[A\n",
      "\n",
      "743it [00:20, 32.36it/s]\u001b[A\u001b[A\n",
      "\n",
      "747it [00:20, 30.41it/s]\u001b[A\u001b[A\n",
      "\n",
      "751it [00:20, 30.64it/s]\u001b[A\u001b[A\n",
      "\n",
      "755it [00:20, 25.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "758it [00:20, 25.77it/s]\u001b[A\u001b[A\n",
      "\n",
      "761it [00:20, 26.12it/s]\u001b[A\u001b[A\n",
      "\n",
      "765it [00:20, 29.06it/s]\u001b[A\u001b[A\n",
      "\n",
      "769it [00:21, 27.74it/s]\u001b[A\u001b[A\n",
      "\n",
      "773it [00:21, 26.95it/s]\u001b[A\u001b[A\n",
      "\n",
      "776it [00:21, 26.97it/s]\u001b[A\u001b[A\n",
      "\n",
      "779it [00:21, 25.18it/s]\u001b[A\u001b[A\n",
      "\n",
      "785it [00:21, 29.37it/s]\u001b[A\u001b[A\n",
      "\n",
      "789it [00:21, 29.62it/s]\u001b[A\u001b[A\n",
      "\n",
      "793it [00:21, 30.62it/s]\u001b[A\u001b[A\n",
      "\n",
      "798it [00:22, 32.66it/s]\u001b[A\u001b[A\n",
      "\n",
      "802it [00:22, 31.70it/s]\u001b[A\u001b[A\n",
      "\n",
      "806it [00:22, 28.80it/s]\u001b[A\u001b[A\n",
      "\n",
      "810it [00:22, 28.63it/s]\u001b[A\u001b[A\n",
      "\n",
      "813it [00:22, 26.66it/s]\u001b[A\u001b[A\n",
      "\n",
      "817it [00:22, 28.34it/s]\u001b[A\u001b[A\n",
      "\n",
      "820it [00:22, 28.24it/s]\u001b[A\u001b[A\n",
      "\n",
      "824it [00:22, 29.15it/s]\u001b[A\u001b[A\n",
      "\n",
      "830it [00:23, 33.38it/s]\u001b[A\u001b[A\n",
      "\n",
      "835it [00:23, 33.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "845it [00:23, 41.38it/s]\u001b[A\u001b[A\n",
      "\n",
      "859it [00:23, 51.39it/s]\u001b[A\u001b[A\n",
      "\n",
      "867it [00:23, 40.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "873it [00:23, 36.29it/s]\u001b[A\u001b[A\n",
      "\n",
      "879it [00:24, 31.09it/s]\u001b[A\u001b[A\n",
      "\n",
      "884it [00:24, 32.21it/s]\u001b[A\u001b[A\n",
      "\n",
      "889it [00:24, 31.85it/s]\u001b[A\u001b[A\n",
      "\n",
      "898it [00:24, 38.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "911it [00:24, 48.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "924it [00:24, 58.16it/s]\u001b[A\u001b[A\n",
      "\n",
      "933it [00:25, 54.71it/s]\u001b[A\u001b[A\n",
      "\n",
      "941it [00:25, 59.48it/s]\u001b[A\u001b[A\n",
      "\n",
      "949it [00:25, 54.68it/s]\u001b[A\u001b[A\n",
      "\n",
      "956it [00:25, 57.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "963it [00:25, 51.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "969it [00:25, 50.64it/s]\u001b[A\u001b[A\n",
      "\n",
      "975it [00:25, 45.05it/s]\u001b[A\u001b[A\n",
      "\n",
      "993it [00:26, 57.72it/s]\u001b[A\u001b[A\n",
      "\n",
      "1002it [00:26, 53.84it/s]\u001b[A\u001b[A\n",
      "\n",
      "1010it [00:26, 46.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "1017it [00:26, 41.94it/s]\u001b[A\u001b[A\n",
      "\n",
      "1023it [00:26, 34.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "1028it [00:27, 34.02it/s]\u001b[A\u001b[A\n",
      "\n",
      "1033it [00:27, 33.26it/s]\u001b[A\u001b[A\n",
      "\n",
      "1037it [00:27, 30.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "1041it [00:27, 29.67it/s]\u001b[A\u001b[A\n",
      "\n",
      "1045it [00:27, 25.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1048it [00:27, 25.19it/s]\u001b[A\u001b[A\n",
      "\n",
      "1052it [00:27, 25.92it/s]\u001b[A\u001b[A\n",
      "\n",
      "1057it [00:28, 28.68it/s]\u001b[A\u001b[A\n",
      "\n",
      "1062it [00:28, 32.25it/s]\u001b[A\u001b[A\n",
      "\n",
      "1066it [00:28, 33.26it/s]\u001b[A\u001b[A\n",
      "\n",
      "1071it [00:28, 34.49it/s]\u001b[A\u001b[A\n",
      "\n",
      "1075it [00:28, 33.88it/s]\u001b[A\u001b[A\n",
      "\n",
      "1079it [00:28, 33.88it/s]\u001b[A\u001b[A\n",
      "\n",
      "1083it [00:28, 34.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1087it [00:28, 34.07it/s]\u001b[A\u001b[A\n",
      "\n",
      "1091it [00:29, 34.53it/s]\u001b[A\u001b[A\n",
      "\n",
      "1095it [00:29, 34.76it/s]\u001b[A\u001b[A\n",
      "\n",
      "1100it [00:29, 37.62it/s]\u001b[A\u001b[A\n",
      "\n",
      "1104it [00:29, 35.67it/s]\u001b[A\u001b[A\n",
      "\n",
      "1108it [00:29, 33.72it/s]\u001b[A\u001b[A\n",
      "\n",
      "1112it [00:29, 34.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "1116it [00:29, 32.23it/s]\u001b[A\u001b[A\n",
      "\n",
      "1121it [00:29, 35.14it/s]\u001b[A\u001b[A\n",
      "\n",
      "1127it [00:29, 39.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "1132it [00:30, 38.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "1137it [00:30, 35.84it/s]\u001b[A\u001b[A\n",
      "\n",
      "1141it [00:30, 32.31it/s]\u001b[A\u001b[A\n",
      "\n",
      "1145it [00:30, 29.97it/s]\u001b[A\u001b[A\n",
      "\n",
      "1159it [00:30, 38.97it/s]\u001b[A\u001b[A\n",
      "\n",
      "1166it [00:30, 37.16it/s]\u001b[A\u001b[A\n",
      "\n",
      "1172it [00:31, 34.42it/s]\u001b[A\u001b[A\n",
      "\n",
      "1177it [00:31, 36.71it/s]\u001b[A\u001b[A\n",
      "\n",
      "1182it [00:31, 38.33it/s]\u001b[A\u001b[A\n",
      "\n",
      "1187it [00:31, 33.92it/s]\u001b[A\u001b[A\n",
      "\n",
      "1191it [00:31, 31.15it/s]\u001b[A\u001b[A\n",
      "\n",
      "1195it [00:31, 25.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1198it [00:32, 25.53it/s]\u001b[A\u001b[A\n",
      "\n",
      "1204it [00:32, 30.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "1208it [00:32, 29.06it/s]\u001b[A\u001b[A\n",
      "\n",
      "1212it [00:32, 29.58it/s]\u001b[A\u001b[A\n",
      "\n",
      "1216it [00:32, 30.89it/s]\u001b[A\u001b[A\n",
      "\n",
      "1220it [00:32, 31.67it/s]\u001b[A\u001b[A\n",
      "\n",
      "1224it [00:32, 29.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "1228it [00:32, 29.12it/s]\u001b[A\u001b[A\n",
      "\n",
      "1232it [00:33, 31.70it/s]\u001b[A\u001b[A\n",
      "\n",
      "1244it [00:33, 40.60it/s]\u001b[A\u001b[A\n",
      "\n",
      "1253it [00:33, 46.22it/s]\u001b[A\u001b[A\n",
      "\n",
      "1260it [00:33, 35.84it/s]\u001b[A\u001b[A\n",
      "\n",
      "1266it [00:33, 31.11it/s]\u001b[A\u001b[A\n",
      "\n",
      "1271it [00:33, 32.36it/s]\u001b[A\u001b[A\n",
      "\n",
      "1277it [00:34, 36.63it/s]\u001b[A\u001b[A\n",
      "\n",
      "1283it [00:34, 39.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "1288it [00:34, 37.87it/s]\u001b[A\u001b[A\n",
      "\n",
      "1295it [00:34, 42.95it/s]\u001b[A\u001b[A\n",
      "\n",
      "1300it [00:34, 43.64it/s]\u001b[A\u001b[A\n",
      "\n",
      "1307it [00:34, 46.47it/s]\u001b[A\u001b[A\n",
      "\n",
      "1312it [00:34, 37.80it/s]\u001b[A\u001b[A\n",
      "\n",
      "1317it [00:35, 37.73it/s]\u001b[A\u001b[A\n",
      "\n",
      "1322it [00:35, 40.13it/s]\u001b[A\u001b[A\n",
      "\n",
      "1328it [00:35, 42.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1334it [00:35, 44.77it/s]\u001b[A\u001b[A\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "1339it [00:35, 44.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1344it [00:35, 40.44it/s]\u001b[A\u001b[A\n",
      "\n",
      "1353it [00:35, 46.99it/s]\u001b[A\u001b[A\n",
      "\n",
      "1359it [00:36, 36.62it/s]\u001b[A\u001b[A\n",
      "\n",
      "1364it [00:36, 37.59it/s]\u001b[A\u001b[A\n",
      "\n",
      "1370it [00:36, 41.01it/s]\u001b[A\u001b[A\n",
      "\n",
      "1375it [00:36, 37.84it/s]\u001b[A\u001b[A\n",
      "\n",
      "1380it [00:36, 31.48it/s]\u001b[A\u001b[A\n",
      "\n",
      "1390it [00:36, 39.27it/s]\u001b[A\u001b[A\n",
      "\n",
      "1396it [00:36, 37.40it/s]\u001b[A\u001b[A\n",
      "\n",
      "1401it [00:37, 39.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "1406it [00:37, 40.86it/s]\u001b[A\u001b[A\n",
      "\n",
      "1411it [00:37, 39.73it/s]\u001b[A\u001b[A\n",
      "\n",
      "1417it [00:37, 42.90it/s]\u001b[A\u001b[A\n",
      "\n",
      "1422it [00:37, 41.08it/s]\u001b[A\u001b[A\n",
      "\n",
      "1427it [00:37, 42.75it/s]\u001b[A\u001b[A\n",
      "\n",
      "1432it [00:37, 38.64it/s]\u001b[A\u001b[A\n",
      "\n",
      "1437it [00:37, 36.16it/s]\u001b[A\u001b[A\n",
      "\n",
      "1443it [00:38, 37.89it/s]\u001b[A\u001b[A\n",
      "\n",
      "1450it [00:38, 43.81it/s]\u001b[A\u001b[A\n",
      "\n",
      "1456it [00:38, 46.94it/s]\u001b[A\u001b[A\n",
      "\n",
      "1462it [00:38, 45.14it/s]\u001b[A\u001b[A\n",
      "\n",
      "1473it [00:38, 54.35it/s]\u001b[A\u001b[A\n",
      "\n",
      "1488it [00:38, 66.77it/s]\u001b[A\u001b[A\n",
      "\n",
      "1497it [00:38, 62.37it/s]\u001b[A\u001b[A\n",
      "\n",
      "1506it [00:38, 63.27it/s]\u001b[A\u001b[A\n",
      "\n",
      "1514it [00:39, 55.91it/s]\u001b[A\u001b[A\n",
      "\n",
      "1521it [00:39, 55.50it/s]\u001b[A\u001b[A\n",
      "\n",
      "1531it [00:39, 63.57it/s]\u001b[A\u001b[A\n",
      "\n",
      "1539it [00:39, 49.23it/s]\u001b[A\u001b[A\n",
      "\n",
      "1546it [00:39, 38.96it/s]\u001b[A\u001b[A\n",
      "\n",
      "1552it [00:40, 34.26it/s]\u001b[A\u001b[A\n",
      "\n",
      "1557it [00:40, 31.47it/s]\u001b[A\u001b[A\n",
      "\n",
      "1561it [00:40, 33.36it/s]\u001b[A\u001b[A\n",
      "\n",
      "1565it [00:40, 33.12it/s]\u001b[A\u001b[A\n",
      "\n",
      "1569it [00:40, 32.13it/s]\u001b[A\u001b[A\n",
      "\n",
      "1573it [00:40, 29.83it/s]\u001b[A\u001b[A\n",
      "\n",
      "1577it [00:40, 29.96it/s]\u001b[A\u001b[A\n",
      "\n",
      "1581it [00:41, 25.44it/s]\u001b[A\u001b[A\n",
      "\n",
      "1584it [00:41, 22.10it/s]\u001b[A\u001b[A\n",
      "\n",
      "1587it [00:41, 38.17it/s]\u001b[A\u001b[A\n"
     ]
    }
   ],
   "source": [
    "sbt_seq = produce_srt(net)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "unitTest Success\n"
     ]
    }
   ],
   "source": [
    "run cv_utils.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {},
   "outputs": [],
   "source": [
    "def show_sbt_imgs(i, db_index):\n",
    "    info = db_index[i]\n",
    "    chi_seq = [cv2.imread(join('./chi_seq_imgs', fn)) for fn in info['chi_seq']]\n",
    "    plt.figure()\n",
    "    plt.imshow(np.hstack(chi_seq))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [],
   "source": [
    "db_index = load_db('./chi_seq_imgs/index.yaml')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {},
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 58 and the array at index 1 has size 53",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-125-ed4a61d3e9f1>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mshow_sbt_imgs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdb_index\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m<ipython-input-119-bfcad97887a3>\u001b[0m in \u001b[0;36mshow_sbt_imgs\u001b[0;34m(i, db_index)\u001b[0m\n\u001b[1;32m      3\u001b[0m     \u001b[0mchi_seq\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mcv2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'./chi_seq_imgs'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mfn\u001b[0m \u001b[0;32min\u001b[0m \u001b[0minfo\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'chi_seq'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m     \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m     \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mimshow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhstack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mchi_seq\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m<__array_function__ internals>\u001b[0m in \u001b[0;36mhstack\u001b[0;34m(*args, **kwargs)\u001b[0m\n",
      "\u001b[0;32m~/hzh/pytorch_venv/lib64/python3.6/site-packages/numpy/core/shape_base.py\u001b[0m in \u001b[0;36mhstack\u001b[0;34m(tup)\u001b[0m\n\u001b[1;32m    342\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0m_nx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconcatenate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marrs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    343\u001b[0m     \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 344\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0m_nx\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconcatenate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marrs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    345\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    346\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m<__array_function__ internals>\u001b[0m in \u001b[0;36mconcatenate\u001b[0;34m(*args, **kwargs)\u001b[0m\n",
      "\u001b[0;31mValueError\u001b[0m: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 58 and the array at index 1 has size 53"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 432x288 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "show_sbt_imgs(10, db_index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "> \u001b[0;32m<__array_function__ internals>\u001b[0m(6)\u001b[0;36mconcatenate\u001b[0;34m()\u001b[0m\n",
      "\n"
     ]
    }
   ],
   "source": [
    "%debug"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(0, 75033.36670003337, '山羊们疯狂地叫了'),\n",
       " (1, 83041.37470804137, '咋咋'),\n",
       " (2, 87003.67033700367, '那天'),\n",
       " (3, 89005.67233900567, '我出生的同时鬼也出生在我们家里'),\n",
       " (4, 99015.68234901568, '躲在妈妈肚子里'),\n",
       " (5, 101017.68435101768, '然后比我早出生化分钟的那东西'),\n",
       " (6, 105021.68835502169, '就靠吃我的腿活着'),\n",
       " (7, 109025.69235902569, '用力'),\n",
       " (8, 111027.6943610277, '抓好腿用力'),\n",
       " (9, 113029.6963630297, '快了用力'),\n",
       " (10, 116032.6993660327, '好再用一次力'),\n",
       " (11, 121037.7043710377, '她还行'),\n",
       " (12, 123039.7063730397, '就腿上有点毛病'),\n",
       " (13, 127002.002002002, '给我毛巾'),\n",
       " (14, 129004.004004004, '看看孩子'),\n",
       " (15, 133008.008008008, '给我毛巾'),\n",
       " (16, 134009.00900900902, '那东西很快会死掉的'),\n",
       " (17, 138013.01301301303, '活不长'),\n",
       " (18, 140015.01501501503, '人们都说'),\n",
       " (19, 144019.01901901903, '当时应该把那东西除掉'),\n",
       " (20, 150025.02502502504, '妈妈生下我们之后过一周就去世了'),\n",
       " (21, 153028.02802802803, '爸爸是一个月后出变通事故去世了'),\n",
       " (22, 157032.03203203203, '这些是我升入初中时爷爷告诉我的'),\n",
       " (23, 165040.04004004004, '还有'),\n",
       " (24, 167000.33366700035, '医生说错了'),\n",
       " (25, 171004.33767100435, '那东西没那么早死掉'),\n",
       " (26, 175008.34167500836, '至今仍然活着'),\n",
       " (27, 207040.3737070404, ''),\n",
       " (28, 249040.7073740407, '我去该死'),\n",
       " (29, 271021.021021021, '那家是前不久搬来的'),\n",
       " (30, 273023.02302302304, '说是卖狗肉的'),\n",
       " (31, 276026.02602602605, '根本见不到那家人'),\n",
       " (32, 279029.029029029, '反正很百怪'),\n",
       " (33, 282032.03203203203, '搬来有多久了'),\n",
       " (34, 284034.03403403406, '大概有一个月吧'),\n",
       " (35, 287037.037037037, '翼'),\n",
       " (36, 288038.03803803807, '翼'),\n",
       " (37, 289039.03903903905, '翼'),\n",
       " (38, 290040.04004004004, '牛是什么时候开始的'),\n",
       " (39, 292000.33366700035, '大概'),\n",
       " (40, 295003.33667000337, '翼'),\n",
       " (41, 296004.33767100435, '翼憋'),\n",
       " (42, 297005.33867200534, '翼憋'),\n",
       " (43, 298006.3396730063, '磷翼'),\n",
       " (44, 310018.35168501834, '快到了就在那边那边'),\n",
       " (45, 312020.35368702037, '直疯狂地晰肯定有问题'),\n",
       " (46, 361027.6943610277, '就这样我们跟鬼同居着'),\n",
       " (47, 374040.70737404074, '请饶恕我这个罪人吧'),\n",
       " (48, 376001.001001001, '恳纫地求您'),\n",
       " (49, 384009.00900900905, '请饶恕我'),\n",
       " (50, 398023.02302302304, '你来一下'),\n",
       " (51, 402027.02702702704, '怎么了'),\n",
       " (52, 403028.028028028, '来一下'),\n",
       " (53, 413038.03803803807, '你学习怎么样'),\n",
       " (54, 418001.33466800133, '有朋友吗'),\n",
       " (55, 423006.3396730064, '这次我一定逛住不搬家'),\n",
       " (56, 431014.3476810144, '你不是恨死它了'),\n",
       " (57, 433016.34968301636, '它是谁'),\n",
       " (58, 434017.35068401735, '你的腿'),\n",
       " (59, 438021.35468802135, '那东西'),\n",
       " (60, 440023.3566900234, '那东西怎么了'),\n",
       " (61, 448031.3646980314, '连个出生证都没有'),\n",
       " (62, 452035.3687020354, '没教它说话所以不会说'),\n",
       " (63, 453036.3697030364, '别说了我都知道'),\n",
       " (64, 455038.3717050384, '我也万万没想到它会活到现在'),\n",
       " (65, 463004.6713380047, '我到现在还是很怕'),\n",
       " (66, 466007.6743410077, '每晚'),\n",
       " (67, 468009.6763430097, '那个门声'),\n",
       " (68, 470011.6783450117, '赎我罪的救世主就在我里面'),\n",
       " (69, 475016.6833500167, '在十字架面前喊主名'),\n",
       " (70, 478019.68635301973, '你听见了吧'),\n",
       " (71, 482023.69035702373, '赞美诗第'),\n",
       " (72, 484025.6923590257, '靠救主的十字架宝血'),\n",
       " (73, 488029.6963630297, '你仔细听听'),\n",
       " (74, 500041.7083750417, '不是人的哭声吧'),\n",
       " (75, 524024.024024024, '这边这边'),\n",
       " (76, 534034.034034034, '好像是孩子的哭声'),\n",
       " (77, 541041.041041041, '胡枝子'),\n",
       " (78, 544002.3356690024, '天地神明'),\n",
       " (79, 548006.3396730063, '公主'),\n",
       " (80, 557015.3486820153, '我来拜见您'),\n",
       " (81, 561019.3526860194, '公主'),\n",
       " (82, 587003.6703370037, '翼'),\n",
       " (83, 588004.6713380046, '翼'),\n",
       " (84, 589005.6723390057, '翼'),\n",
       " (85, 590006.6733400067, '翼憋'),\n",
       " (86, 591007.6743410077, '翼憋'),\n",
       " (87, 592008.6753420087, '翼憋'),\n",
       " (88, 593009.6763430097, '翼'),\n",
       " (89, 594010.6773440107, '翼'),\n",
       " (90, 595011.6783450117, '翼'),\n",
       " (91, 596012.6793460127, '翼憋'),\n",
       " (92, 597013.6803470138, '翼'),\n",
       " (93, 598014.6813480147, '翼'),\n",
       " (94, 599015.6823490157, '所谓的恶并不很特别'),\n",
       " (95, 604020.6873540207, '正是这些假的'),\n",
       " (96, 607023.6903570237, '大家所看到的这些假先知'),\n",
       " (97, 609025.6923590257, '换句话说这些异端邪教案件'),\n",
       " (98, 611027.6943610277, '勤发生迫巴起'),\n",
       " (99, 613029.6963630298, '受害公婆达公'),\n",
       " (100, 617033.7003670337, '大韩民国是宗教非常自臼的国家'),\n",
       " (101, 621037.7043710378, '站在属灵战争的前沿'),\n",
       " (102, 626001.001001001, '希望大家多多关注'),\n",
       " (103, 629004.0040040041, '拜托了'),\n",
       " (104, 632007.007007007, '首尔神学大学金泰植牧师'),\n",
       " (105, 636011.0110110111, '还有最后一点也是最重要的'),\n",
       " (106, 642017.017017017, '那就是信心'),\n",
       " (107, 644019.0190190191, '非常需要各位那宝贡的信心'),\n",
       " (108, 650025.025025025, '独自上陆骸地的耶酥的心慎'),\n",
       " (109, 655030.0300300301, '你们明白吗'),\n",
       " (110, 657032.032032032, '请帮帮我们'),\n",
       " (111, 659034.034034034, '请为我们祷告'),\n",
       " (112, 661036.0360360361, '我们要成为世上的盐和光'),\n",
       " (113, 663038.0380380381, '朴雄才是异端邪教'),\n",
       " (114, 665040.04004004, '是异端邪教异端邪教'),\n",
       " (115, 667000.3336670004, '放下牧师职位'),\n",
       " (116, 669002.3356690024, '放下放下'),\n",
       " (117, 671004.3376710044, '不要侵害一'),\n",
       " (118, 672005.3386720053, '不要侵害人权'),\n",
       " (119, 673006.3396730063, '不要侵害不要侵害'),\n",
       " (120, 675008.3416750084, '赶走朴雄才'),\n",
       " (121, 682015.3486820153, '不要侵害人权'),\n",
       " (122, 684017.3506840174, '不要侵害不要侵害'),\n",
       " (123, 685018.3516850184, '弟兄奸妹们举起手发誓'),\n",
       " (124, 690023.3566900233, '那边朴雄才来了'),\n",
       " (125, 693026.3596930264, '哪里哪里哪里'),\n",
       " (126, 705038.3717050384, '这帮大妈们还拿吃的开玩笑'),\n",
       " (127, 709000.6673340007, '所以啊我不是让你小心点了吗'),\n",
       " (128, 712003.6703370037, '你惹错刚才那位修女了'),\n",
       " (129, 715006.6733400067, '我的外套'),\n",
       " (130, 716007.6743410077, '牧师您的人气直线上升啊'),\n",
       " (131, 720011.6783450117, '是啊还好这次是女性粉丝'),\n",
       " (132, 723014.6813480147, '又买了外套啊'),\n",
       " (133, 755005.005005005, '哎哟'),\n",
       " (134, 757007.007007007, '哎哟取暖费都出来万了'),\n",
       " (135, 760010.01001001, '但又不能不换气'),\n",
       " (136, 761011.0110110111, '最近家家的空气清新器也'),\n",
       " (137, 765015.015015015, '劝事'),\n",
       " (138, 766016.016016016, '监埋教团的活动费还没汇进来吧'),\n",
       " (139, 768018.0180180181, '您得赶紧写报道才会给汇吧'),\n",
       " (140, 772022.022022022, '成天就知道嘴上说'),\n",
       " (141, 775025.025025025, '劝事啊我都喘不过气来了'),\n",
       " (142, 780030.0300300301, '太会偷懒了偷懒'),\n",
       " (143, 782032.032032032, '我去趟江原道'),\n",
       " (144, 785035.0350350351, '是为鹿冻死的事去吗厂'),\n",
       " (145, 787037.0370370371, '难道我要一个人去休假不成'),\n",
       " (146, 789039.039039039, '又要惹事了一厂'),\n",
       " (147, 791041.041041041, '赶紧把摩西再临教报道写完吧'),\n",
       " (148, 794002.3356690024, '哎哟劝事啊要慢慢来'),\n",
       " (149, 797005.3386720053, '就算攻击他们也不敢起诉的'),\n",
       " (150, 800008.3416750084, '那么神之爱修女那事呢'),\n",
       " (151, 801009.3426760094, '己了'),\n",
       " (152, 804012.3456790124, '明天发给月刊就是'),\n",
       " (153, 807015.3486820154, '标题是'),\n",
       " (154, 809017.3506840174, '癌症也能医好色修女们'),\n",
       " (155, 816024.3576910244, '最后不要写感叹号要写问号问号'),\n",
       " (156, 819027.3606940274, '低俗啊低俗'),\n",
       " (157, 821029.3626960294, '这叫商业化'),\n",
       " (158, 823031.3646980315, '赶紧回来把拖欠的专栏和报道写完吧'),\n",
       " (159, 825033.3667000334, '劝事'),\n",
       " (160, 828036.3697030364, '佛教那边啊'),\n",
       " (161, 830038.3717050384, '金额单位就不一样'),\n",
       " (162, 832040.3737070404, '今年冬天的休假就去'),\n",
       " (163, 836002.6693360027, '百厂'),\n",
       " (164, 837003.6703370037, '还有那个'),\n",
       " (165, 838004.6713380048, '空气清新器'),\n",
       " (166, 840006.6733400067, '阿门'),\n",
       " (167, 841007.6743410077, '空气清新器'),\n",
       " (168, 842008.6753420087, '空气清新器'),\n",
       " (169, 843009.6763430097, '阿门'),\n",
       " (170, 865031.6983650317, '亡好请看这边'),\n",
       " (171, 868034.7013680347, '这是什么花'),\n",
       " (172, 870036.7033700368, '莲花'),\n",
       " (173, 872038.7053720388, '是的'),\n",
       " (174, 873039.7063730397, '莲花是很高贵的花'),\n",
       " (175, 876001.001001001, '虽然生长在淤泥里'),\n",
       " (176, 878003.0030030031, '但是出淤泥而不粱的美丽花朵'),\n",
       " (177, 883008.008008008, '各位'),\n",
       " (178, 886011.0110110111, '这世界是淤泥'),\n",
       " (179, 888013.013013013, '而且变得越来越野蛮凶翼瓣'),\n",
       " (180, 893018.0180180181, '但我们的绷求能改变世界'),\n",
       " (181, 898023.023023023, '磷翼憋好那么'),\n",
       " (182, 899024.024024024, '憋最后为上次的晋州合风灾民们祷告'),\n",
       " (183, 903028.0280280281, '然后结束聚会'),\n",
       " (184, 905030.0300300301, '请将军保护我们'),\n",
       " (185, 929012.3456790124, '饭得好好吃'),\n",
       " (186, 932015.3486820154, '你倒是给点经费啊'),\n",
       " (187, 933016.3496830164, '先花你的然后来报销'),\n",
       " (188, 936019.3526860194, '光嘴上说'),\n",
       " (189, 940023.3566900234, '不过怎么抓不到把柄呢'),\n",
       " (190, 942025.3586920254, '就那些吗'),\n",
       " (191, 943026.3596930264, '就那些'),\n",
       " (192, 945028.3616950284, '但也应该有点直觉哪'),\n",
       " (193, 947030.3636970303, '你干这事又不是一天两夫'),\n",
       " (194, 950033.3667000334, '是不是'),\n",
       " (195, 951034.3677010344, '有一点很奇怪'),\n",
       " (196, 954037.3707040374, '那就是没有任何把柄'),\n",
       " (197, 958041.3747080414, '那么教埋方面呢'),\n",
       " (198, 960001.6683350017, '不是'),\n",
       " (199, 963004.6713380048, '是檀君吗'),\n",
       " (200, 966007.6743410077, '不是那样的'),\n",
       " (201, 967008.6753420087, '比想象中百典'),\n",
       " (202, 969010.6773440107, '偏向于佛教中的秘教'),\n",
       " (203, 972013.6803470138, '但很十净'),\n",
       " (204, 973014.6813480147, '也不收奉献金'),\n",
       " (205, 975016.6833500167, '反而还资助生活困难的信徒'),\n",
       " (206, 979020.6873540208, '还给资助啊'),\n",
       " (207, 981022.6893560227, '那肯定是传销传销'),\n",
       " (208, 985026.6933600267, '不是那样的'),\n",
       " (209, 986027.6943610277, '还有什么'),\n",
       " (210, 990031.6983650317, '非要找出点问题的话'),\n",
       " (211, 993034.7013680347, '佛教不是拜佛祖或菩萨吗'),\n",
       " (212, 996037.7043710378, '没错'),\n",
       " (213, 998039.7063730397, '可这边是'),\n",
       " (214, 1000041.7083750417, '拜将军'),\n",
       " (215, 1001001.001001001, '两处都是'),\n",
       " (216, 1006006.006006006, '我不是说这些'),\n",
       " (217, 1008008.008008008, '要有刺激人的更强烈的'),\n",
       " (218, 1010010.0100100101, '能煽动人的'),\n",
       " (219, 1015015.015015015, '大师们那边我大概搪塞一下'),\n",
       " (220, 1019019.0190190191, '百典道士那边你再挖深一些'),\n",
       " (221, 1022022.022022022, '挖出点料来'),\n",
       " (222, 1037037.0370370371, '咽'),\n",
       " (223, 1040040.04004004, '组长您怎么不接电话'),\n",
       " (224, 1042000.3336670004, '一大早的这算什么事啊'),\n",
       " (225, 1046004.3376710044, '叫你们不要动'),\n",
       " (226, 1048006.3396730063, '要保护好现场哪'),\n",
       " (227, 1050008.3416750084, '都让开组长来了'),\n",
       " (228, 1057015.3486820154, '是被卡车撞的'),\n",
       " (229, 1059017.3506840174, '这是什么啊'),\n",
       " (230, 1060018.3516850183, '不腐烂反倒枯干了'),\n",
       " (231, 1065023.3566900233, '好像动工没多久啊'),\n",
       " (232, 1067025.3586920253, '是的应该不难'),\n",
       " (233, 1069027.3606940275, '己经联系了建筑单位'),\n",
       " (234, 1072030.3636970303, '有点矮'),\n",
       " (235, 1075033.3667000334, '我说个子有点矮'),\n",
       " (236, 1078036.3697030365, '顶多是个初中生'),\n",
       " (237, 1084000.6673340008, '调查摩西教江原道总部时'),\n",
       " (238, 1086002.6693360028, '偶然发现的佛教界新兴宗教'),\n",
       " (239, 1090006.6733400067, '佛堂开在太白和胚善两处'),\n",
       " (240, 1092008.6753420087, '信徒数还不到名'),\n",
       " (241, 1095011.6783450118, '大部分是教师和护士还有公务员'),\n",
       " (242, 1098014.6813480146, '朴所长'),\n",
       " (243, 1101017.6843510177, '那样的佛堂全国至少有多处'),\n",
       " (244, 1104020.6873540208, '等一等'),\n",
       " (245, 1107023.6903570236, '您知道我为什么担心这个吗'),\n",
       " (246, 1111027.6943610278, '鹿野园这地方哪'),\n",
       " (247, 1115031.6983650317, '不收取信徒们一分一毫'),\n",
       " (248, 1118034.7013680348, '这有什么好担心的'),\n",
       " (249, 1121037.7043710377, '你们知道口本的奥姆真埋教吧'),\n",
       " (250, 1123039.7063730396, '在地铁里投放毒气的那帮人'),\n",
       " (251, 1125041.7083750418, '知道一开始是怎么起步的吗'),\n",
       " (252, 1128003.003003003, '就是俞仙团体'),\n",
       " (253, 1130005.005005005, '就这样开设几个团体后'),\n",
       " (254, 1133008.0080080081, '教主麻原彰晃就打着佛教的旗号'),\n",
       " (255, 1138013.013013013, '说我是菩萨我是神'),\n",
       " (256, 1140015.0150150151, '最后怎么样了呢'),\n",
       " (257, 1143018.018018018, '不显而易见吗'),\n",
       " (258, 1145020.02002002, '就是末世'),\n",
       " (259, 1147022.0220220222, '末世来临'),\n",
       " (260, 1149024.0240240241, '放下一纫去天国吧'),\n",
       " (261, 1154029.0290290292, '当时真的死了很多人'),\n",
       " (262, 1157032.032032032, '到时候就来不及了'),\n",
       " (263, 1160035.035035035, '或教埋上的矛盾加以制裁'),\n",
       " (264, 1163038.0380380382, '人们'),\n",
       " (265, 1172005.3386720053, '朴雄才牧师您的话我们听明白了'),\n",
       " (266, 1175008.3416750084, '依我看啊不算是新兴宗教'),\n",
       " (267, 1178011.3446780115, '倒像是社交团体或福利团体形式的神院'),\n",
       " (268, 1182015.3486820154, '您或许不清楚我们佛教的根本是相生'),\n",
       " (269, 1186019.3526860194, '大师'),\n",
       " (270, 1188021.3546880214, '翼憋我干这一行十了十多年'),\n",
       " (271, 1190023.3566900233, '一行十了十多年'),\n",
       " (272, 1191024.3576910244, '都宗教净化工作'),\n",
       " (273, 1194027.3606940275, '听我说憋'),\n",
       " (274, 1195028.3616950284, '听我说翼'),\n",
       " (275, 1196029.3626960295, '靠基督教式的二分法很难到埋'),\n",
       " (276, 1200033.3667000334, '院长大师'),\n",
       " (277, 1201034.3677010345, '不久之前在忠州的传道团中'),\n",
       " (278, 1203036.3697030365, '在追踪分的节目中被曝光过'),\n",
       " (279, 1207040.3737070404, '我觉得并没什么坏处'),\n",
       " (280, 1215006.6733400067, '那个章鱼脑袋怎么就那么讨厌我呢'),\n",
       " (281, 1219010.6773440107, '前辈'),\n",
       " (282, 1220011.6783450118, '你身上做生意的气息太重了'),\n",
       " (283, 1222013.6803470138, '哎哟'),\n",
       " (284, 1223014.6813480146, '什么生意'),\n",
       " (285, 1225016.6833500168, '问梧大师就是摇钱树'),\n",
       " (286, 1227018.6853520188, '你只管讨好他就行了'),\n",
       " (287, 1228019.6863530197, '做好事就做得轻松点好吗'),\n",
       " (288, 1230021.6883550216, '把那个叫鹿野园的资料给我一份吧'),\n",
       " (289, 1235026.6933600267, '我会抛一个话头出去'),\n",
       " (290, 1238029.6963630298, '宗教的三大要素是什么呢'),\n",
       " (291, 1240031.6983650317, '教主信徒经书'),\n",
       " (292, 1246037.7043710377, '肯定写了一份百己的经书'),\n",
       " (293, 1249040.7073740407, '要么是百我解读'),\n",
       " (294, 1250041.7083750418, '要么就是写了不被认可的经书'),\n",
       " (295, 1252002.002002002, '才有名分去施压'),\n",
       " (296, 1256006.0060060062, '没错'),\n",
       " (297, 1259009.009009009, '南无观世音菩萨'),\n",
       " (298, 1276026.026026026, '发现了尸体'),\n",
       " (299, 1280030.03003003, '警方己介入调查'),\n",
       " (300, 1282032.032032032, '所发现的尸体'),\n",
       " (301, 1284034.034034034, '东江女子中学的朴某'),\n",
       " (302, 1287037.037037037, '警方为了确认准确死因己委托尸检'),\n",
       " (303, 1291041.041041041, '逐渐缩小调查网'),\n",
       " (304, 1316024.3576910244, '铁进怎么这么晚才回来'),\n",
       " (305, 1318026.3596930264, '你也得吃饭啊'),\n",
       " (306, 1320028.3616950284, '快坐吧'),\n",
       " (307, 1323031.3646980315, '有朋友要来就提前说一声啊'),\n",
       " (308, 1327035.3687020354, '没什么菜可如何是好'),\n",
       " (309, 1337003.6703370037, '我早就猜到广百你木'),\n",
       " (310, 1338004.6713380048, '会来找我'),\n",
       " (311, 1342008.6753420087, '至少还能这样见上一面'),\n",
       " (312, 1344010.6773440107, '隔了这么多年'),\n",
       " (313, 1350016.6833500168, '我是矢败品'),\n",
       " (314, 1354020.6873540208, '没能保护父亲到最后'),\n",
       " (315, 1356022.6893560227, '因为没有勇气所以就这样躲了起来'),\n",
       " (316, 1357023.6903570239, '不是的不是的可能木'),\n",
       " (317, 1359025.6923590258, '只是你妈妈做的热乎乎的饭菜'),\n",
       " (318, 1363029.6963630298, '会让你变得软弱吧'),\n",
       " (319, 1371037.7043710377, '我很害怕'),\n",
       " (320, 1374040.7073740407, '每天晚上他们木'),\n",
       " (321, 1376001.001001001, '那些死去的孩子们都会蜂拥而来'),\n",
       " (322, 1378003.003003003, '广目这很奇怪有些东西木'),\n",
       " (323, 1381006.0060060062, '有些东西正在往错误的方向发展'),\n",
       " (324, 1383008.0080080081, '持国'),\n",
       " (325, 1386011.011011011, '我们现在是在和邪恶作斗争'),\n",
       " (326, 1389014.014014014, '在替天行道'),\n",
       " (327, 1393018.018018018, '你是知道的'),\n",
       " (328, 1398023.023023023, '你也知道增长为了多闻圆寂了吧'),\n",
       " (329, 1402027.027027027, '知道'),\n",
       " (330, 1408033.0330330331, '请选择死亡吧'),\n",
       " (331, 1411036.036036036, '这个世界不久之后便会找上你的'),\n",
       " (332, 1418001.3346680014, '被血淋湿的野兽啊停止流泪吧'),\n",
       " (333, 1422005.3386720053, '抬起头看一眼明灯'),\n",
       " (334, 1426009.3426760093, '跪下'),\n",
       " (335, 1429012.3456790124, '拭十眼泪擦亮眼看一看'),\n",
       " (336, 1432015.3486820154, '苦痛乃信任之果'),\n",
       " (337, 1435018.3516850185, '苦痛会净化血液'),\n",
       " (338, 1437020.3536870205, '而那血液将会照亮世间'),\n",
       " (339, 1440023.3566900233, '不要惧怕黑暗中的野兽们'),\n",
       " (340, 1443026.3596930264, '你们会战胜这世间的邪恶'),\n",
       " (341, 1445028.3616950284, '掩盖在明灯之上的毒蛇'),\n",
       " (342, 1448031.3646980315, '终将死于你们之手'),\n",
       " (343, 1469010.6773440107, '红豆吗'),\n",
       " (344, 1470011.6783450118, '是的在隧道桥的尸体上卢'),\n",
       " (345, 1473014.6813480146, '孩子的嘴和食道里发现有很多'),\n",
       " (346, 1476017.6843510177, '也有这种可能吧'),\n",
       " (347, 1480021.6883550216, '确实是这样'),\n",
       " (348, 1482023.6903570239, '述有一些很奇怪的护身待'),\n",
       " (349, 1487028.6953620287, '还有以前巾翼'),\n",
       " (350, 1488029.6963630298, '好像有过类似的情况翼'),\n",
       " (351, 1491032.6993660328, '翼憋'),\n",
       " (352, 1492033.7003670337, '翼'),\n",
       " (353, 1493034.7013680348, '翼'),\n",
       " (354, 1494035.7023690357, '翼'),\n",
       " (355, 1495036.7033700368, '翼憋'),\n",
       " (356, 1496037.7043710377, '翼我们'),\n",
       " (357, 1497038.7053720388, '翼我们'),\n",
       " (358, 1498039.7063730399, '磷翼是纯洁的鹿'),\n",
       " (359, 1499040.7073740407, '是纯洁的鹿'),\n",
       " (360, 1501001.001001001, '而且'),\n",
       " (361, 1503003.003003003, '在威胁着善良'),\n",
       " (362, 1508008.0080080081, '几天前我们徐在磐会员的母亲'),\n",
       " (363, 1511011.011011011, '因为交通事故去世了'),\n",
       " (364, 1515015.0150150151, '还有'),\n",
       " (365, 1517017.0170170171, '金婶言的丈夫遭遇了很大的事故'),\n",
       " (366, 1524024.0240240241, '如果'),\n",
       " (367, 1527027.027027027, '那个醉酒驾驶的加害者'),\n",
       " (368, 1529029.0290290292, '和丈夫工地上的管埋者'),\n",
       " (369, 1532032.032032032, '他们都没有诞生于世的话'),\n",
       " (370, 1534034.034034034, '也不会发生这种事情了'),\n",
       " (371, 1537037.037037037, '都是相互关联着的'),\n",
       " (372, 1542000.3336670003, '也正因为有黑暗'),\n",
       " (373, 1544002.3356690025, '所以守护光明的人们才更为耀眼'),\n",
       " (374, 1549007.3406740073, '在鹿野园的经书中'),\n",
       " (375, 1551009.3426760095, '没错了经书'),\n",
       " (376, 1557015.3486820154, '正如大家所知'),\n",
       " (377, 1558016.3496830163, '鹿野园经书作为神之书'),\n",
       " (378, 1561019.3526860194, '世上仅存四本'),\n",
       " (379, 1581039.3727060393, '经书啊经书啊'),\n",
       " (380, 1585001.6683350017, '在经书的最后'),\n",
       " (381, 1587003.6703370037, '诞生于这世上'),\n",
       " (382, 1592008.6753420087, '小个魔军'),\n",
       " (383, 1596012.6793460127, '哎哟喂'),\n",
       " (384, 1598014.6813480149, '能看出类型了'),\n",
       " (385, 1602018.6853520188, '威胁着善良气韵的存在'),\n",
       " (386, 1608024.6913580247, '你们在这儿待命你们跟我上来'),\n",
       " (387, 1611027.6943610278, '确认有没有人走出这栋楼'),\n",
       " (388, 1612028.6953620287, '好的走吧'),\n",
       " (389, 1622038.7053720388, '我是宁越邑的赵明焕警官'),\n",
       " (390, 1625041.7083750418, '这里有叫金铁进的人吗'),\n",
       " (391, 1628003.003003003, '有什么事呢'),\n",
       " (392, 1629004.0040040042, '我们在找隧道桥案件的嫌疑人'),\n",
       " (393, 1632007.007007007, '名字叫金铁进'),\n",
       " (394, 1634009.009009009, '地址目前显示是这里'),\n",
       " (395, 1637012.012012012, '您应该是来错地方了'),\n",
       " (396, 1639014.014014014, '这里只是个佛堂'),\n",
       " (397, 1641016.016016016, '看起来也像是那样'),\n",
       " (398, 1644019.019019019, '先把这些人的身份证全都确认一遍'),\n",
       " (399, 1647022.0220220222, '不好意思希望大家配合'),\n",
       " (400, 1648023.023023023, '算了先只确认身份证就行了'),\n",
       " (401, 1651026.026026026, '好像是个冒牌地址'),\n",
       " (402, 1653028.028028028, '喂臭小子这还看不出来吗'),\n",
       " (403, 1655030.03003003, '我刚到就发现了'),\n",
       " (404, 1661036.0360360362, '咽怎么了'),\n",
       " (405, 1662037.037037037, '咽刚打算撤队呢'),\n",
       " (406, 1664039.039039039, '该死的'),\n",
       " (407, 1671004.3376710045, '真是辛苦了'),\n",
       " (408, 1677010.3436770104, '您是'),\n",
       " (409, 1679012.3456790124, '我正在调查楼上传教团我叫朴雄才'),\n",
       " (410, 1686019.3526860194, '我在电视节目中见过你'),\n",
       " (411, 1688021.3546880214, '真人比电视上好看多了'),\n",
       " (412, 1690023.3566900233, '但是你们来这儿是调查什么呢'),\n",
       " (413, 1693026.3596930264, '组长'),\n",
       " (414, 1694027.3606940275, '那个金铁进巾'),\n",
       " (415, 1696029.3626960295, '找到他母亲的住址了'),\n",
       " (416, 1701034.3677010345, '走吧'),\n",
       " (417, 1703036.3697030365, '那您辛苦'),\n",
       " (418, 1711002.6693360028, '金铁进'),\n",
       " (419, 1724015.6823490157, '请选择死亡吧'),\n",
       " (420, 1726017.6843510177, '然后你的专职'),\n",
       " (421, 1729020.6873540208, '我会继续负责'),\n",
       " (422, 1787037.037037037, '煞翼'),\n",
       " (423, 1788038.0380380382, '翼'),\n",
       " (424, 1789039.039039039, '粱憋'),\n",
       " (425, 1790040.0400400402, '翼憋'),\n",
       " (426, 1791041.041041041, '翼憋'),\n",
       " (427, 1792000.3336670003, '翼憋'),\n",
       " (428, 1793001.3346680014, '翼'),\n",
       " (429, 1794002.3356690025, '翼'),\n",
       " (430, 1795003.3366700034, '翼'),\n",
       " (431, 1796004.3376710045, '翼憋'),\n",
       " (432, 1797005.3386720053, '翼憋'),\n",
       " (433, 1798006.3396730064, '这个叫鹿野园的地方翼'),\n",
       " (434, 1800008.3416750084, '不仅仅存在于太白和胚善两个地方'),\n",
       " (435, 1802010.3436770104, '是说其它地方也有吗'),\n",
       " (436, 1803011.3446780115, '堤川'),\n",
       " (437, 1805013.3466800135, '鹿的图案'),\n",
       " (438, 1806014.3476810143, '没错'),\n",
       " (439, 1807015.3486820154, '述有这里丹阳'),\n",
       " (440, 1809017.3506840174, '都是一样的图案'),\n",
       " (441, 1811019.3526860194, '你是怎么知道还有其它几个地方的'),\n",
       " (442, 1813021.3546880214, '因为巾'),\n",
       " (443, 1815023.3566900233, '必须再存在两处才对'),\n",
       " (444, 1818026.3596930264, '看一下你手里太白地区的将军画像'),\n",
       " (445, 1823031.3646980315, '还有准善佛堂的画像'),\n",
       " (446, 1826034.3677010345, '这怎么了'),\n",
       " (447, 1827035.3687020354, '这些巾'),\n",
       " (448, 1830038.3717050385, '不是将军'),\n",
       " (449, 1833041.3747080415, '是象征东西南北的四大天干'),\n",
       " (450, 1837003.6703370037, '四天王'),\n",
       " (451, 1839005.6723390056, '是的罩'),\n",
       " (452, 1840006.6733400067, '用四天王'),\n",
       " (453, 1844010.6773440107, '守护佛祖的四个守护神'),\n",
       " (454, 1847013.6803470138, '这是其中的两个'),\n",
       " (455, 1871037.7043710377, '首先'),\n",
       " (456, 1872038.7053720388, '我们来看看太白的鹿野园'),\n",
       " (457, 1875041.7083750418, '看下方有两个侍从'),\n",
       " (458, 1878003.003003003, '石边比较小的这个是乾达婆'),\n",
       " (459, 1881006.0060060062, '然后左边带着毕舍遮'),\n",
       " (460, 1884009.009009009, '手里抱着琵琶的蓝面之神'),\n",
       " (461, 1888013.0130130132, '是守护东方的持国天王'),\n",
       " (462, 1892017.0170170171, '丝后鲜善的姿闻去主'),\n",
       " (463, 1894019.019019019, '一鬼逆返叉却罗剑侄迫侍丛'),\n",
       " (464, 1897022.0220220222, '左手拿着宝塔'),\n",
       " (465, 1898023.023023023, '石手拿枪'),\n",
       " (466, 1900025.025025025, '他是守护北方的神'),\n",
       " (467, 1903028.028028028, '来看这个地图的话'),\n",
       " (468, 1904029.0290290292, '就能解开秘密了'),\n",
       " (469, 1906031.0310310312, '太白的持国天王东方'),\n",
       " (470, 1910035.035035035, '所以像东南西北'),\n",
       " (471, 1913038.0380380382, '所以像这样以类似的方式画上东南西北'),\n",
       " (472, 1915040.0400400402, '就能再得出两个地方'),\n",
       " (473, 1917000.3336670003, '西方的堤川'),\n",
       " (474, 1918001.3346680014, '广目天王'),\n",
       " (475, 1919002.3356690025, '南方的丹阳'),\n",
       " (476, 1920003.3366700034, '增长天王'),\n",
       " (477, 1922005.3386720053, '这么多年的斋饭没白吃啊'),\n",
       " (478, 1927010.3436770104, '最近我吃的可是知识'),\n",
       " (479, 1930013.3466800135, '很好很好很好'),\n",
       " (480, 1932015.3486820154, '供奉这些的体'),\n",
       " (481, 1934017.3506840174, '你有见过吗'),\n",
       " (482, 1936019.3526860194, '没有'),\n",
       " (483, 1937020.3536870205, '我也是第一次见到'),\n",
       " (484, 1947030.3636970303, '这四天王'),\n",
       " (485, 1949032.3656990326, '原本是存在于印度的恶鬼'),\n",
       " (486, 1953036.3697030365, '但是见到佛祖之后眼依佛门'),\n",
       " (487, 1955038.3717050385, '之后'),\n",
       " (488, 1957040.3737070404, '就成了抓鬼怪的神'),\n",
       " (489, 1960001.6683350017, '抓恶鬼的恶神啊'),\n",
       " (490, 1966007.6743410078, '经书啊经书啊'),\n",
       " (491, 1973014.6813480149, ''),\n",
       " (492, 1979020.6873540208, ''),\n",
       " (493, 1985026.6933600267, '约瑟'),\n",
       " (494, 1996037.704371038, '您先进去吧'),\n",
       " (495, 1998039.7063730399, '要你先进去才行啊'),\n",
       " (496, 2002002.002002002, '快进去'),\n",
       " (497, 2004004.0040040042, '真是的'),\n",
       " (498, 2012012.012012012, '好像是有人居住的房间'),\n",
       " (499, 2014014.014014014, '金铁进'),\n",
       " (500, 2017017.0170170171, '看这'),\n",
       " (501, 2020020.0200200202, '是持国天王的经书哪'),\n",
       " (502, 2085001.6683350017, '到地方了'),\n",
       " (503, 2086002.6693360028, '嫌疑人上楼了'),\n",
       " (504, 2088004.6713380048, '在下达命令之前全体待翼憋'),\n",
       " (505, 2090006.6733400067, '翼'),\n",
       " (506, 2091007.6743410078, '翼'),\n",
       " (507, 2092008.6753420087, '翼'),\n",
       " (508, 2093009.6763430098, '粥憋'),\n",
       " (509, 2094010.6773440107, '翼憋'),\n",
       " (510, 2095011.6783450118, '翼'),\n",
       " (511, 2096012.6793460127, '翼'),\n",
       " (512, 2097013.6803470138, '翼'),\n",
       " (513, 2098014.6813480146, '磷翼憋'),\n",
       " (514, 2122038.7053720388, '妈妈'),\n",
       " (515, 2124040.707374041, '现在开始认真听好我说的话'),\n",
       " (516, 2127002.002002002, '不管别人怎么说'),\n",
       " (517, 2129004.004004004, '眼见不一定为实'),\n",
       " (518, 2131006.006006006, '你的儿子'),\n",
       " (519, 2133008.008008008, '为了这个世界'),\n",
       " (520, 2135010.01001001, '曾经和邪恶作斗争'),\n",
       " (521, 2138013.013013013, '只有上天会明白我的劳苦'),\n",
       " (522, 2143018.018018018, '是个被祝福的儿子'),\n",
       " (523, 2146021.021021021, '在天界'),\n",
       " (524, 2148023.0230230233, '我一定巾'),\n",
       " (525, 2150025.025025025, '是楼顶楼顶'),\n",
       " (526, 2152027.027027027, '快点'),\n",
       " (527, 2154029.029029029, '去楼顶'),\n",
       " (528, 2157032.032032032, '我一定会紧紧抱住您的'),\n",
       " (529, 2164039.039039039, '在如来仁慈的微笑下'),\n",
       " (530, 2167000.3336670003, '野兽终在与毒蛇的战斗中获胜'),\n",
       " (531, 2171004.3376710042, '上天不会忘记你的劳苦'),\n",
       " (532, 2175008.3416750086, '看吧'),\n",
       " (533, 2177010.3436770104, '现在野兽要插上双翼'),\n",
       " (534, 2181014.3476810143, '重获'),\n",
       " (535, 2183016.3496830165, '新生'),\n",
       " (536, 2185018.3516850183, '下来'),\n",
       " (537, 2188021.3546880214, '不要'),\n",
       " (538, 2196029.3626960292, '嫌疑人跳下去了'),\n",
       " (539, 2236027.694361028, '喂金铁进的资料'),\n",
       " (540, 2239030.697364031, '感谢了姐姐'),\n",
       " (541, 2241032.6993660326, '喂别贫嘴'),\n",
       " (542, 2243034.701368035, '以后这种事情别来找我'),\n",
       " (543, 2244035.7023690357, '你姐姐是冤大头吗'),\n",
       " (544, 2246037.704371038, '你不是都忘了'),\n",
       " (545, 2249040.707374041, '我也会帮你的啊'),\n",
       " (546, 2251001.001001001, '大家就是这样互帮互助地生活啊'),\n",
       " (547, 2252002.002002002, '像现在这样的年末圣诞节'),\n",
       " (548, 2254004.004004004, '你知道大家有多敏感吗'),\n",
       " (549, 2258008.008008008, '喂你好'),\n",
       " (550, 2261011.011011011, '我出来了一趟'),\n",
       " (551, 2263013.013013013, '马上回去'),\n",
       " (552, 2265015.015015015, '杨州少年管教所吗'),\n",
       " (553, 2267017.017017017, '金铁进曾经是青少年杀人犯'),\n",
       " (554, 2278028.028028028, '你好'),\n",
       " (555, 2279029.029029029, '咽你好啊'),\n",
       " (556, 2295003.3366700034, '这是持国大人委托我的'),\n",
       " (557, 2297005.3386720056, '应该是经常搬家的家庭'),\n",
       " (558, 2300008.3416750086, '这个学籍记录簿应该是最新的'),\n",
       " (559, 2303011.3446780113, '辛苦了菩萨'),\n",
       " (560, 2306014.3476810143, '广目大人'),\n",
       " (561, 2308016.3496830165, '十分荣幸见到您'),\n",
       " (562, 2351017.6843510177, '稍后到达的是东首尔东首尔客车'),\n",
       " (563, 2355021.6883550216, '此客车为收费客车'),\n",
       " (564, 2387012.0120120123, '翼'),\n",
       " (565, 2388013.013013013, '翼憋'),\n",
       " (566, 2389014.014014014, '翼憋'),\n",
       " (567, 2390015.015015015, '翼'),\n",
       " (568, 2391016.0160160162, '辙'),\n",
       " (569, 2392017.017017017, '翼憋'),\n",
       " (570, 2393018.018018018, '翼憋'),\n",
       " (571, 2394019.0190190193, '翼憋'),\n",
       " (572, 2395020.02002002, '翼'),\n",
       " (573, 2396021.021021021, '翼'),\n",
       " (574, 2397022.022022022, '翼憋'),\n",
       " (575, 2398023.0230230233, '翼憋'),\n",
       " (576, 2399024.024024024, '愿用十字架的滚烫来洗涤罪恶'),\n",
       " (577, 2406031.031031031, '洗刷我罪恶的主啊'),\n",
       " (578, 2410035.035035035, '让我们来高声称颂吧'),\n",
       " (579, 2428011.3446780113, ''),\n",
       " (580, 2448031.3646980315, '你为什么总锁门'),\n",
       " (581, 2451034.3677010345, '我害怕'),\n",
       " (582, 2453036.3697030363, '送饭了吗'),\n",
       " (583, 2456039.3727060393, '问你送没送饭呢'),\n",
       " (584, 2458041.3747080415, '赶紧去送饭'),\n",
       " (585, 2550008.3416750086, '太白持国天王的经书上可见'),\n",
       " (586, 2553011.3446780113, '都是初期佛经密经和金刚经'),\n",
       " (587, 2558016.3496830165, '重要的是'),\n",
       " (588, 2560018.3516850183, '这里有生平第一次见的经文'),\n",
       " (589, 2563021.3546880214, '是在最后一页的经书'),\n",
       " (590, 2565023.3566900236, '名字叫降魔经'),\n",
       " (591, 2568026.3596930266, '降魔'),\n",
       " (592, 2569027.3606940275, '没错'),\n",
       " (593, 2570028.3616950284, '就跟发音一样'),\n",
       " (594, 2571029.3626960292, '是魔军和神们战斗的内容'),\n",
       " (595, 2573031.3646980315, '是一种预言集'),\n",
       " (596, 2575033.3667000337, '更有趣的是'),\n",
       " (597, 2576034.3677010345, '其他佛经都有着过分精细的解析'),\n",
       " (598, 2579037.3707040376, '但只有这降魔经只是象征性地写一下'),\n",
       " (599, 2584000.6673340006, '就像圣经中的启示录一样'),\n",
       " (600, 2588004.671338005, '你有没有听过降魔相关的'),\n",
       " (601, 2590006.6733400067, '没有'),\n",
       " (602, 2591007.6743410076, '你怎么连这都不知道'),\n",
       " (603, 2595011.6783450115, '哎呀你下班就可以了'),\n",
       " (604, 2598014.6813480146, '你化妆了吗'),\n",
       " (605, 2606022.689356023, '劝事这位是僧人'),\n",
       " (606, 2610026.693360027, '不是啦很适合的'),\n",
       " (607, 2615031.6983650317, '闹闻在地的野兽们插翅重生'),\n",
       " (608, 2619035.7023690357, '践踏本土根深蒂固的蛇们'),\n",
       " (609, 2625041.708375042, '守护灯火的野兽们'),\n",
       " (610, 2627002.002002002, '践踏蛇的星星们'),\n",
       " (611, 2630005.0050050053, '擦干眼泪不要遮掩身形'),\n",
       " (612, 2632007.007007007, '抓住盘膝在少女身上的蛇吧'),\n",
       " (613, 2636011.011011011, '那些蛇们的眼睛很是美丽'),\n",
       " (614, 2638013.013013013, '蛇的舌头也很甜蜜'),\n",
       " (615, 2641016.0160160162, '勇猛的野兽们'),\n",
       " (616, 2643018.018018018, '请不要直视蛇的眼睛'),\n",
       " (617, 2645020.02002002, '请不要听蛇的言语'),\n",
       " (618, 2648023.0230230233, '只有那些蛇的血液才能让你们圣洁'),\n",
       " (619, 2677010.3436770104, '叔叔'),\n",
       " (620, 2687020.3536870205, '翼'),\n",
       " (621, 2688021.3546880214, '翼'),\n",
       " (622, 2689022.3556890227, '翼'),\n",
       " (623, 2690023.3566900236, '翼憋'),\n",
       " (624, 2691024.3576910244, '翼憋'),\n",
       " (625, 2692025.3586920253, '翼'),\n",
       " (626, 2693026.3596930266, '翼'),\n",
       " (627, 2694027.3606940275, '翼'),\n",
       " (628, 2695028.3616950284, '翼憋'),\n",
       " (629, 2696029.3626960292, '翼憋'),\n",
       " (630, 2697030.3636970306, '翼'),\n",
       " (631, 2698031.3646980315, '磷翼'),\n",
       " (632, 2729020.687354021, '罗汉'),\n",
       " (633, 2731022.689356023, '罗汉你该醒了'),\n",
       " (634, 2740031.6983650317, '在仁慈的微奖下'),\n",
       " (635, 2742033.700367034, '我的野兽们在与蛇的战争中取得胜利'),\n",
       " (636, 2745036.703370037, '再次重生'),\n",
       " (637, 2748039.7063730396, '这滚烫的闪亮光芒将会守护你们'),\n",
       " (638, 2753003.003003003, '没错'),\n",
       " (639, 2755005.0050050053, '是四天王没错'),\n",
       " (640, 2756006.006006006, '没错'),\n",
       " (641, 2758008.008008008, '来看这里就知道'),\n",
       " (642, 2760010.01001001, '一开始是野兽'),\n",
       " (643, 2762012.0120120123, '之后遇到了佛祖眼依我佛'),\n",
       " (644, 2764014.014014014, '升夫后成为了佛祖'),\n",
       " (645, 2771021.021021021, '这些人'),\n",
       " (646, 2775025.025025025, '原来是在到处抓鬼哪'),\n",
       " (647, 2779029.029029029, '亥安能知道这经书是谁写的吗'),\n",
       " (648, 2781031.031031031, '看那最后一页写着本名呢'),\n",
       " (649, 2783033.0330330334, '叫金偿师'),\n",
       " (650, 2786036.036036036, '金偿师吗'),\n",
       " (651, 2788038.038038038, '金偿师'),\n",
       " (652, 2790040.04004004, '士吧'),\n",
       " (653, 2792000.3336670003, '谷博博士是谁'),\n",
       " (654, 2795003.3366700034, '谷歌啦'),\n",
       " (655, 2797005.3386720056, ''),\n",
       " (656, 2803011.3446780113, '申劝事你刚刚这是表演个人才艺了吗'),\n",
       " (657, 2807015.3486820157, '真是'),\n",
       " (658, 2808016.3496830165, '哎呀我得给你加薪才行'),\n",
       " (659, 2811019.3526860196, ''),\n",
       " (660, 2817025.3586920253, '佛教宗教'),\n",
       " (661, 2819027.3606940275, '哦看看这么快就出来了'),\n",
       " (662, 2822030.3636970306, '西藏佛教东方教教主金济石想见到他'),\n",
       " (663, 2827035.3687020354, '东方教'),\n",
       " (664, 2829037.3707040376, '啊原来是那个金济石'),\n",
       " (665, 2832040.3737070407, '腮他在我们这个圈子里也很有名来着'),\n",
       " (666, 2834000.6673340006, '百前也有很多追随者'),\n",
       " (667, 2836002.669336003, '东方教教主金济石制作了这个经典'),\n",
       " (668, 2840006.6733400067, '确实有一个东方教相关的专家'),\n",
       " (669, 2845011.678345012, '谁啊'),\n",
       " (670, 2847013.6803470138, '问梧'),\n",
       " (671, 2849015.682349016, '也就是章鱼'),\n",
       " (672, 2851017.6843510177, '问梧大师很势利的'),\n",
       " (673, 2854020.687354021, '我会先给他打电话'),\n",
       " (674, 2855021.6883550216, '你一定要买点好东西去哦'),\n",
       " (675, 2858024.6913580247, '哪童鱼死'),\n",
       " (676, 2860026.693360027, '他怎么不在海里'),\n",
       " (677, 2863029.69636303, '而是住在山上啊'),\n",
       " (678, 2872038.7053720388, '竟然可以开车上来'),\n",
       " (679, 2890015.015015015, '你们拿了很珍贵的东西哦'),\n",
       " (680, 2893018.018018018, '很珍贵'),\n",
       " (681, 2894019.0190190193, '大师们本来就对身外物很有压力嘛'),\n",
       " (682, 2898023.0230230233, '谢谢'),\n",
       " (683, 2901026.0260260263, '六千块的诚意啊'),\n",
       " (684, 2903028.028028028, '六千块的'),\n",
       " (685, 2907032.032032032, '我跟亥安大师通过电话了'),\n",
       " (686, 2909034.0340340342, '啊是'),\n",
       " (687, 2910035.035035035, '东方教金济石'),\n",
       " (688, 2916041.0410410413, '我最先想对你们说的话是'),\n",
       " (689, 2921004.3376710042, '偿师金济石'),\n",
       " (690, 2925008.3416750086, '是真的'),\n",
       " (691, 2928011.3446780113, '什么是真的'),\n",
       " (692, 2929012.3456790126, '一句话来说他是个成为神的人'),\n",
       " (693, 2933016.3496830165, '当时保守的佛教组织非常避讳此人'),\n",
       " (694, 2938021.3546880214, '但金济石是达到圣佛极致之人'),\n",
       " (695, 2943026.3596930266, '这是他的照片'),\n",
       " (696, 2946029.3626960292, '内年左石'),\n",
       " (697, 2949032.3656990323, '你们可以想想他到底有多出众'),\n",
       " (698, 2951034.3677010345, '甚至是总督也把他视为师父'),\n",
       " (699, 2957040.3737070407, '你是说他是亲日派吗'),\n",
       " (700, 2958041.3747080415, '我的话还没说完'),\n",
       " (701, 2961002.669336003, '啊对不起'),\n",
       " (702, 2962003.6703370037, '他反而曾经是义烈团的独立长'),\n",
       " (703, 2966007.6743410076, '光复之后'),\n",
       " (704, 2967008.675342009, '都是他重新要回来的'),\n",
       " (705, 2971012.679346013, '但是'),\n",
       " (706, 2973014.6813480146, '当时政局过于模糊'),\n",
       " (707, 2975016.683350017, '金济石'),\n",
       " (708, 2976017.6843510177, '选择把一切都归于宗教界了'),\n",
       " (709, 2979020.687354021, '如此一来势力就百然而然扩大了'),\n",
       " (710, 2982023.690357024, '那就是东方教吧'),\n",
       " (711, 2984025.6923590256, '没错'),\n",
       " (712, 2987028.6953620287, '煞翼然后到了内年'),\n",
       " (713, 2990031.6983650317, '金济散东方教隐藏了踪迹'),\n",
       " (714, 2995036.703370037, '为什么翼憋'),\n",
       " (715, 2996037.704371038, '为什么翼憋'),\n",
       " (716, 2997038.7053720388, '他说他要写一本经书翼'),\n",
       " (717, 3007007.007007007, '几乎没人亲眼见过他'),\n",
       " (718, 3010010.01001001, '只有他身边的弟子才能见到他本人'),\n",
       " (719, 3014014.014014014, '他这会儿还活着吗'),\n",
       " (720, 3016016.0160160162, '或许吧'),\n",
       " (721, 3017017.017017017, '阴历二月一八九九年生'),\n",
       " (722, 3022022.022022022, '现在是'),\n",
       " (723, 3023023.0230230233, '是岁'),\n",
       " (724, 3025025.025025025, '应该己经涅米了'),\n",
       " (725, 3028028.028028028, '很可惜'),\n",
       " (726, 3029029.029029029, '牧师这里'),\n",
       " (727, 3032032.032032032, '咽看到了'),\n",
       " (728, 3044002.3356690025, '是啊监狱长'),\n",
       " (729, 3046004.3376710042, '天气变冷了圣诞节也快到了'),\n",
       " (730, 3049007.3406740073, '我突然就想起我们少年犯们了'),\n",
       " (731, 3053011.3446780113, '好一会儿见'),\n",
       " (732, 3064022.3556890227, '你不会认为他还活着吧'),\n",
       " (733, 3066024.3576910244, '应该死了吧'),\n",
       " (734, 3069027.3606940275, '如果他是假的'),\n",
       " (735, 3075033.3667000337, '你真的不好奇吗'),\n",
       " (736, 3077035.3687020354, '好奇什么'),\n",
       " (737, 3079037.3707040376, '如果真的存在在某个地方呢'),\n",
       " (738, 3085001.668335002, '您说什么呢牧师老天爷是活着的'),\n",
       " (739, 3089005.672339006, '老天爷是活着的'),\n",
       " (740, 3098014.6813480146, '刚从神学学校毕业后就结了婚'),\n",
       " (741, 3102018.685352019, '之后去南非宣传神教了'),\n",
       " (742, 3105021.6883550216, '一直非常努力祈祷'),\n",
       " (743, 3108024.6913580247, '是一对诚实的夫妻'),\n",
       " (744, 3111027.694361028, '但是几年后他一个人回来了'),\n",
       " (745, 3115031.6983650317, '为什么'),\n",
       " (746, 3118034.701368035, '他们一家人全部被枪杀了'),\n",
       " (747, 3123039.7063730396, '岁的儿子'),\n",
       " (748, 3126001.0010010013, '还有刚出生的'),\n",
       " (749, 3131006.006006006, '刚出生的女儿全部都死了'),\n",
       " (750, 3137012.0120120123, '你知道他是怎么说的吗'),\n",
       " (751, 3147022.022022022, '他说这是神的意思'),\n",
       " (752, 3152027.027027027, '我现在也不明白'),\n",
       " (753, 3157032.032032032, '我们在那最底下像蚂蚁一样激烈挣扎'),\n",
       " (754, 3162037.0370370373, '我们老天爷到底在哪儿做什么呢'),\n",
       " (755, 3169002.3356690025, '所以我打算替他去见一面'),\n",
       " (756, 3173006.3396730064, '不是说那人成神了吗'),\n",
       " (757, 3182015.3486820157, '从这里进去就可以了'),\n",
       " (758, 3188021.3546880214, '宗教问题研究所吗'),\n",
       " (759, 3191024.3576910244, '怎么突然想起给孩子们送礼物了'),\n",
       " (760, 3194027.3606940275, '咽就是顺便来看看孩子们'),\n",
       " (761, 3198031.3646980315, '也正好来拜见下辛苦的监狱长'),\n",
       " (762, 3201034.3677010345, '我怎么觉得不是呢'),\n",
       " (763, 3205038.3717050385, '牧师'),\n",
       " (764, 3207040.3737070407, '我在这里待了年'),\n",
       " (765, 3210001.668335002, '这世上没有没埋由的资助'),\n",
       " (766, 3212003.6703370037, '你可以放心在这里把事情处埋完没关系'),\n",
       " (767, 3217008.675342009, '所长真是太痛快了'),\n",
       " (768, 3219010.6773440107, '以前那个东'),\n",
       " (769, 3221012.679346013, '我听说你们曾受到过东方教的资助'),\n",
       " (770, 3225016.683350017, '大概有年了'),\n",
       " (771, 3227018.685352019, '没错'),\n",
       " (772, 3228019.68635302, '当时的实习匠人建立了这个济石馆'),\n",
       " (773, 3231022.689356023, '啊哦'),\n",
       " (774, 3233024.6913580247, '东方教教主金偿师金济石吗'),\n",
       " (775, 3239030.697364031, '曾经在宗教界成为了针对性人物'),\n",
       " (776, 3243034.701368035, '但他是个很好的人'),\n",
       " (777, 3245036.703370037, '他把我们少年犯们当成是亲儿子来对待'),\n",
       " (778, 3249040.707374041, '啊为什么会这样呢'),\n",
       " (779, 3251001.0010010013, ''),\n",
       " (780, 3252002.002002002, '什么'),\n",
       " (781, 3255005.0050050053, '是没有那种没埋由的资助吗'),\n",
       " (782, 3256006.006006006, ''),\n",
       " (783, 3261011.011011011, '当时的金偿师'),\n",
       " (784, 3263013.013013013, '积极资助了这四个少年犯'),\n",
       " (785, 3267017.017017017, '四个人是指'),\n",
       " (786, 3270020.02002002, '四个杀害了父亲的少年犯'),\n",
       " (787, 3274024.024024024, '毕竟教育上是存在界限的'),\n",
       " (788, 3276026.0260260263, '所以才用宗教之力'),\n",
       " (789, 3278028.028028028, '甚至超越这个'),\n",
       " (790, 3279029.029029029, '金偿师认他们做了养子'),\n",
       " (791, 3284034.0340340342, '这四个人全部都是吗'),\n",
       " (792, 3287037.0370370373, '而其中一个就是金铁进吧翼憋'),\n",
       " (793, 3289039.039039039, '是啊不觉得很美翼'),\n",
       " (794, 3293001.3346680016, '成为一敬的父奈'),\n",
       " (795, 3295003.3366700034, '翼么这里面'),\n",
       " (796, 3297005.3386720056, '翼剩下的三个少年犯'),\n",
       " (797, 3299007.3406740073, '剩下的三个少年犯'),\n",
       " (798, 3301009.3426760095, '我能知道他们是谁吗'),\n",
       " (799, 3333041.3747080415, '咒语'),\n",
       " (800, 3356022.689356023, '郑罗汉金铁进蔡太根全相蕊'),\n",
       " (801, 3359025.6923590256, '他们四人都出现在了经书里'),\n",
       " (802, 3362028.6953620287, '藏在发光河水中的蔡氏听好了'),\n",
       " (803, 3364030.697364031, '你是野兽是沾染血液的野兽'),\n",
       " (804, 3367033.700367034, '世人只看得见你的黑暗一面'),\n",
       " (805, 3369035.7023690357, '但不要悲伤'),\n",
       " (806, 3371037.704371038, '非常准确对上了'),\n",
       " (807, 3373039.7063730396, '发光的河'),\n",
       " (808, 3375041.708375042, '发光的光就是光州的光吧'),\n",
       " (809, 3376001.0010010013, '蔡氏说的就是故乡是光州的蔡太根'),\n",
       " (810, 3379004.004004004, '还有星星河的郑氏'),\n",
       " (811, 3382007.007007007, '星州星州郑氏郑罗汉'),\n",
       " (812, 3383008.0080080084, '星州星州郑呀郑罗汉'),\n",
       " (813, 3385010.01001001, '青色的河青州金氏金铁进'),\n",
       " (814, 3389014.014014014, '天雷之河震州'),\n",
       " (815, 3391016.0160160162, '隐藏的野兽全氏'),\n",
       " (816, 3393018.018018018, '震州全氏全相蕊'),\n",
       " (817, 3395020.02002002, '经言非常明确'),\n",
       " (818, 3397022.022022022, '经书上的预言非常明确'),\n",
       " (819, 3398023.0230230233, '少年管教所里的四个孩子'),\n",
       " (820, 3400025.025025025, '还有中三个人己经死了'),\n",
       " (821, 3405030.0300300303, '三个人死了这是什么意思'),\n",
       " (822, 3409034.0340340342, '你看好了'),\n",
       " (823, 3411036.036036036, '看胚善还有丹阳的四天王佛画'),\n",
       " (824, 3414039.039039039, '头上有光背哦'),\n",
       " (825, 3417000.3336670003, '光背'),\n",
       " (826, 3418001.3346680016, '也会在头上画背光'),\n",
       " (827, 3421004.3376710042, '我也很好奇'),\n",
       " (828, 3423006.3396730064, '才有背光'),\n",
       " (829, 3428011.3446780113, '这说明他们己经死了'),\n",
       " (830, 3431014.3476810143, '就是涅拨了'),\n",
       " (831, 3433016.3496830165, '非常高贡为了抓鬼'),\n",
       " (832, 3437020.3536870205, '不会吧'),\n",
       " (833, 3439022.3556890227, '现在金铁进也死了'),\n",
       " (834, 3442025.3586920253, '所以太白持国天王头上也要有背光'),\n",
       " (835, 3446029.3626960297, '那么现在'),\n",
       " (836, 3448031.3646980315, '只剩下他一个人了'),\n",
       " (837, 3450033.3667000337, ''),\n",
       " (838, 3454037.3707040376, '么天的广目天王'),\n",
       " (839, 3459000.6673340006, ''),\n",
       " (840, 3461002.669336003, ''),\n",
       " (841, 3510010.01001001, '咒语'),\n",
       " (842, 3513013.013013013, ''),\n",
       " (843, 3517017.017017017, '咒语'),\n",
       " (844, 3587003.6703370037, '翼憋'),\n",
       " (845, 3588004.671338005, '翼憋'),\n",
       " (846, 3589005.672339006, '翼'),\n",
       " (847, 3590006.6733400067, '翼'),\n",
       " (848, 3591007.6743410076, '翼语'),\n",
       " (849, 3592008.675342009, ''),\n",
       " (850, 3593009.67634301, '翼憋'),\n",
       " (851, 3594010.6773440107, '翼'),\n",
       " (852, 3595011.678345012, '翼'),\n",
       " (853, 3596012.679346013, '翼'),\n",
       " (854, 3597013.6803470138, '翼憋'),\n",
       " (855, 3598014.6813480146, '翼憋'),\n",
       " (856, 3599015.682349016, '咒语'),\n",
       " (857, 3600016.683350017, '咒语'),\n",
       " (858, 3687020.3536870205, '四个人中真的死了三个'),\n",
       " (859, 3690023.3566900236, '首先全相蕊'),\n",
       " (860, 3692025.3586920253, '死于宁越玛利亚月子中心火灾'),\n",
       " (861, 3695028.3616950284, '唉不光产妇'),\n",
       " (862, 3697030.3636970306, '还死了不少孩子'),\n",
       " (863, 3700033.3667000337, '那个在加拿大身亡的蔡太根呢'),\n",
       " (864, 3702035.3687020354, '他的是抢劫杀人案'),\n",
       " (865, 3706039.3727060393, '一个移民过去的韩国家庭'),\n",
       " (866, 3711002.669336003, '逃跑过程中被捕'),\n",
       " (867, 3713004.671338005, '在多伦多被拘留时上吊自杀了'),\n",
       " (868, 3717008.675342009, '这样就没有关联性了'),\n",
       " (869, 3721012.679346013, '最后一个幸存者郑罗汉呢'),\n",
       " (870, 3724015.682349016, '年生的郑罗汉'),\n",
       " (871, 3727018.685352019, '我对他也有点印象'),\n",
       " (872, 3729020.687354021, '一个在私眉街长大的中学生'),\n",
       " (873, 3731022.689356023, '徒手把自己的父亲打死了'),\n",
       " (874, 3734025.692359026, '母亲应该就在私眉街接活'),\n",
       " (875, 3737028.6953620287, '他的父奈肯定就是个人渣'),\n",
       " (876, 3740031.6983650317, '明摆着的'),\n",
       " (877, 3742033.700367034, '所以作为嫌疑人的郑罗汉的去向'),\n",
       " (878, 3744035.7023690357, '被上头这样那样地议来议论去'),\n",
       " (879, 3749040.707374041, '也可以说'),\n",
       " (880, 3751001.0010010013, '他是个可怜的家伙'),\n",
       " (881, 3753003.003003003, '可怜什么'),\n",
       " (882, 3804012.3456790126, '我的孩子白色的羔羊'),\n",
       " (883, 3810018.3516850183, '在妈妈怀里睡吧睡吧'),\n",
       " (884, 3816024.3576910244, '寒冷的冬天漫天的雪花'),\n",
       " (885, 3821029.3626960297, '不要飘到我们家'),\n",
       " (886, 3827035.3687020354, '漆黑的夜赶快退去'),\n",
       " (887, 3833041.3747080415, '不要来到我们家'),\n",
       " (888, 3839005.672339006, '睡吧睡吧我的孩子'),\n",
       " (889, 3845011.678345012, '不要哭泣睡吧睡吧'),\n",
       " (890, 3855021.6883550216, '不要来到我们家'),\n",
       " (891, 3887012.0120120123, '翼'),\n",
       " (892, 3888013.013013013, '翼'),\n",
       " (893, 3889014.014014014, '翼'),\n",
       " (894, 3890015.0150150154, '翼憋'),\n",
       " (895, 3891016.0160160162, '翼'),\n",
       " (896, 3892017.017017017, '广诅'),\n",
       " (897, 3894019.0190190193, '翼憋'),\n",
       " (898, 3895020.02002002, '本人比较帅嘛'),\n",
       " (899, 3898023.0230230233, '磷翼'),\n",
       " (900, 3929012.3456790126, ''),\n",
       " (901, 3932015.3486820157, '一'),\n",
       " (902, 3935018.3516850183, ''),\n",
       " (903, 3959000.667334001, '一'),\n",
       " (904, 3960001.668335002, '一一'),\n",
       " (905, 3961002.669336003, '一'),\n",
       " (906, 3962003.6703370037, '叉'),\n",
       " (907, 3964005.672339006, '丫穴'),\n",
       " (908, 3965006.6733400067, '丫党'),\n",
       " (909, 3966007.6743410076, '立鸵尧'),\n",
       " (910, 3967008.675342009, '卢鸵兑'),\n",
       " (911, 3970011.678345012, '广目去人来了'),\n",
       " (912, 3972013.6803470138, '一'),\n",
       " (913, 3973014.6813480146, '一一己今'),\n",
       " (914, 3974015.682349016, '之云'),\n",
       " (915, 3975016.683350017, '子二'),\n",
       " (916, 3976017.6843510177, '您来了之'),\n",
       " (917, 3979020.687354021, '为'),\n",
       " (918, 3980021.6883550216, ''),\n",
       " (919, 3981022.689356023, ''),\n",
       " (920, 3982023.690357024, ''),\n",
       " (921, 3983024.6913580247, ''),\n",
       " (922, 3984025.692359026, ''),\n",
       " (923, 3990031.6983650317, '都说鹿长生不老'),\n",
       " (924, 3993034.701368035, '弱'),\n",
       " (925, 4003003.003003003, '它们会投胎成公'),\n",
       " (926, 4005005.0050050053, '是啊'),\n",
       " (927, 4008008.0080080084, '可为什么死去的时候'),\n",
       " (928, 4010010.01001001, '一'),\n",
       " (929, 4014014.014014014, '为丝苔柔努黎瓷亡'),\n",
       " (930, 4015015.0150150154, '圣着楚了变毫券袭鳖'),\n",
       " (931, 4016016.0160160162, '七笔食宰旁拿繁窄丫'),\n",
       " (932, 4017017.017017017, '空学火令旁考去袭'),\n",
       " (933, 4018018.018018018, '力火笺忽案皱黎伞'),\n",
       " (934, 4019019.0190190193, '人煌'),\n",
       " (935, 4020020.02002002, '一夹并是那样'),\n",
       " (936, 4022022.0220220224, '都清'),\n",
       " (937, 4023023.0230230233, '都清广'),\n",
       " (938, 4024024.024024024, '绽'),\n",
       " (939, 4025025.025025025, '那些蛇的如此美丽'),\n",
       " (940, 4028028.028028028, ''),\n",
       " (941, 4029029.029029029, '又巧辩'),\n",
       " (942, 4030030.0300300303, '势要体内的蛇'),\n",
       " (943, 4031031.031031031, '势要抓到内的蛇'),\n",
       " (944, 4035035.035035035, '一不曾伪装在柔弱呵叉美丽的外表下吗'),\n",
       " (945, 4041041.0410410413, '不要被骗'),\n",
       " (946, 4043001.3346680016, '她就是蛇翼'),\n",
       " (947, 4062020.3536870205, '丫丫'),\n",
       " (948, 4064022.3556890227, ''),\n",
       " (949, 4065023.3566900236, '法师'),\n",
       " (950, 4066024.3576910244, '法师'),\n",
       " (951, 4068026.3596930266, '广目来了'),\n",
       " (952, 4070028.3616950284, ''),\n",
       " (953, 4079037.3707040376, '野兽们听好'),\n",
       " (954, 4081039.3727060393, '当蛇滴下第一滴血'),\n",
       " (955, 4084000.667334001, '明灯会熄灭'),\n",
       " (956, 4086002.669336003, '世界将一片黑暗'),\n",
       " (957, 4090006.6733400067, '要抓紧时间'),\n",
       " (958, 4092008.675342009, '现在只剩下你了'),\n",
       " (959, 4096012.679346013, '星河郑氏听好'),\n",
       " (960, 4100016.683350017, '广百'),\n",
       " (961, 4102018.685352019, '以后你的名字就是广百'),\n",
       " (962, 4105021.6883550216, '广阔之眼'),\n",
       " (963, 4108024.6913580247, '你就是抓西方鬼怪的勇猛的将军'),\n",
       " (964, 4113029.69636303, ''),\n",
       " (965, 4114030.697364031, ''),\n",
       " (966, 4121037.704371038, ''),\n",
       " (967, 4122038.7053720388, '你会星'),\n",
       " (968, 4124040.707374041, '一你会成为星星翼'),\n",
       " (969, 4125041.708375042, '也会成为我的星乏'),\n",
       " (970, 4127002.002002002, '也会成为我的星星'),\n",
       " (971, 4128003.003003003, '会成为照亮世界的星星'),\n",
       " (972, 4133008.0080080084, '我一定会守护您'),\n",
       " (973, 4138013.013013013, '让佛法行于世'),\n",
       " (974, 4141016.0160160162, '暗的丝婆'),\n",
       " (975, 4145020.02002002, '追'),\n",
       " (976, 4151026.0260260263, '一产'),\n",
       " (977, 4153028.028028028, ''),\n",
       " (978, 4164039.039039039, '法师说他爱您'),\n",
       " (979, 4170003.3366700034, '也没'),\n",
       " (980, 4187020.3536870205, '煞翼'),\n",
       " (981, 4188021.3546880214, '翼'),\n",
       " (982, 4189022.3556890227, '翼憋'),\n",
       " (983, 4190023.3566900236, '翼憋'),\n",
       " (984, 4191024.3576910244, '翼'),\n",
       " (985, 4192025.3586920253, '翼'),\n",
       " (986, 4193026.3596930266, '翼'),\n",
       " (987, 4194027.3606940275, '翼憋'),\n",
       " (988, 4195028.361695029, '翼憋'),\n",
       " (989, 4196029.362696029, '翼'),\n",
       " (990, 4197030.363697031, '翼'),\n",
       " (991, 4198031.364698032, '翼'),\n",
       " (992, 4219010.677344011, '您是哪位'),\n",
       " (993, 4221012.679346013, '您是怎么进来的'),\n",
       " (994, 4223014.681348015, '这里禁止入内'),\n",
       " (995, 4226017.684351018, '走着走着就'),\n",
       " (996, 4230021.688355022, '不好意思请您离开这里'),\n",
       " (997, 4233024.691358025, '好对不起'),\n",
       " (998, 4239030.69736403, '等等'),\n",
       " (999, 4243034.701368035, '又要从小路走吗'),\n",
       " ...]"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sbt_seq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
